P27279 [AtCoder] November Festival
普及
题目描述

Problem Description

A vote is being held to decide the theme for the NF (November Festival) at Kyoto University.

There are $ N $ theme proposals, and the $ i $th proposal currently has $ a_i $ votes.

$ X $ votes are about to be cast.

The theme will be chosen randomly from among the proposals that have the maximum number of votes after these $ X $ votes are cast.

Determine the number of theme proposals that could potentially be chosen as the theme.

Input Format

The input is given from the standard input in the following format:

$ N $ $ X $ $ a_1 $ $ a_2 $ $ ... $ $ a_N $

Output Format

Output the number of theme proposals that could potentially be chosen as the theme.

Sample Input and Output

Sample Input #1

5 5
1 3 5 7 9

Sample Output #1

3

Sample Input #2

5 2
1 3 5 7 9

Sample Output #2

2

Notes/Hints

Constraints

  • $1 \leq N \leq 1000$
  • $1 \leq a_i \leq 1000$
  • $1 \leq X \leq 1000$
  • All inputs are integers.

Sample Explanation 1

In this example, the 3rd, 4th, and 5th theme proposals could potentially be chosen as the theme.

Sample Explanation 2

In this example, the 4th and 5th theme proposals could potentially be chosen as the theme. Note that if there are multiple theme proposals with the maximum number of votes, any of them could be chosen as the theme.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
5 5 1 3 5 7 9
样例输出
3