#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double eps = 1e-6;
const int inf = 1e9;
const long long llf = 1e18;
const int mod = 1e9 + 7;
const int maxn = 1e5 + 10;
int n, k;
struct ppo {
  int x, i;
} a[110];
int b[1010];
int vis[1010];
queue<int> q;
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> b[i];
    q.push(i);
  }
  for (int i = 1; i <= k; i++) {
    if (!q.empty()) {
      a[i].i = q.front();
      a[i].x = 1;
      q.pop();
    }
  }
  int ans = 0;
  int cas = 0, d = 0;
  while (true) {
    int cnt = 0;
    for (int i = 1; i <= k; i++) {
      if (a[i].i != 0 && a[i].x <= b[a[i].i]) {
        if (a[i].x == d) {
          if (!vis[a[i].i]) ans++;
          vis[a[i].i] = 1;
        }
        if (a[i].x == b[a[i].i]) {
          cas++;
          if (!q.empty()) {
            a[i].i = q.front();
            a[i].x = 0;
            q.pop();
          } else {
            a[i].i = 0;
            a[i].x = 0;
          }
        }
        a[i].x++;
      }
      if (a[i].i == 0) cnt++;
    }
    d = 1000 * cas / n + 5;
    d /= 10;
    if (cnt == k) break;
  }
  cout << ans << endl;
  return 0;
}
