시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB19516514386.145%

문제

Everyone knows that the UCF Programming Team coaches are the best trainers in the world and turn out some of the best problem solvers and programmers. The UCF team members are heavily sought after by different companies. FAAMGInc has arranged a nice raise package to attract the UCF team members. When it comes to giving raises, FAAMGInc gives each team member two options: a fixed raise or double their salary. Each team member can then decide which option they’d like. For example, if the fixed raise offered by FAAMGInc is \$5,000, then a team member earning \$3,000 would choose the fixed raise option (\$5,000) but a team member making \$8,000 would pick the double the salary option since that will be a better raise (\$8,000 raise instead of \$5,000 raise).

Given the fixed raise offered by FAAMGInc and the salary of each team member, determine which option is picked the most.

입력

The first input line contains two integers: n (1 ≤ n ≤ 30), indicating the number of team members and r (1 ≤ r ≤ 50,000), indicating the fixed raise offered by FAAMGInc. Each of the next n input lines contains an integer (between 1 and 200000, inclusive) indicating the current salary for a team member.

출력

Output will be a single integer: 1, 2, or 0. Print 1 if the majority of the team members choose the fixed raise option, 2 if the majority pick the double the salary option, and 0 if the two options are selected by the same number of team members.

If a team member will end up with the same raise choosing either option, that team member doesn’t count towards either group. For example, if the fixed raise is \$2000 and a team member’s current salary is \$2000, the fixed raise and double the salary end up with the same raise for this team member so the team member doesn’t count towards either group.

예제 입력 1

6 1000
200
3000
500
2000
800
700

예제 출력 1

1

예제 입력 2

4 600
10
9000
20
8000

예제 출력 2

0

예제 입력 3

3 400
10000
9000
20

예제 출력 3

2

예제 입력 4

6 2500
100
100000
2500
100
2500
200000

예제 출력 4

0

노트

The financial statements in this problem are fictional.