#CCBCHBAHAI0000167. Vòng tiếp theo (Next Round)

Vòng tiếp theo (Next Round)

Next Round

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem

nn contestants have scores in non-increasing order: a1≥a2≥⋯≥ana_1\ge a_2\ge\cdots\ge a_n. A contestant advances iff the score is positive and at least the score of the contestant in place kk.

With threshold T=akT=a_k, count the indices satisfying ai>0a_i>0 and ai≥Ta_i\ge T.

Input

  • Line 1: integers n,kn,k.
  • Line 2: nn scores.

Output

Print the number of advancing contestants.

Subtask

Subtask 1 (100 points): 1≤k≤n≤501\le k\le n\le50; 0≤ai≤1000\le a_i\le100; a0≥a1≥⋯≥an−1a_0\ge a_1\ge\cdots\ge a_{n-1}.

Example

Input

8 5
10 9 8 7 7 7 5 5

Output

6

Explanation

The threshold is 77; the first six positive scores are at least 77.