56. Doors

Time Limit: 2 seconds

Memory Limit: 128 MB

Rating: 1000

Problem Statement

Cary wants to choose $K$ doors from a list of $N$ doors to check. Given the value of $N$ , the total number of doors and $X$, the number of combinations he can choose from, output the value of $K$.

Input

The first line has two space-separated integers $N$ and $X$. $0 < N \le 30$

Output

Output the value of $K$.

Sample Cases
Sample Input 1:
2 1

Sample Output 1:
2

Sample Input 2:
30 145422675

Sample Output 2:
14
Explanation

Not available for this problem.

Sources

IanOJ Contest #1 (Div. 3) > Problem B

Submit | Back