#include <bits/stdc++.h>
using namespace std;
int mn[3001], mx[3001], n, p[3001];
long long res = 0;
bool l[3001][3001] = {0};
void loop(int one, int st, int k) {
  if (!l[one][st]) {
    ++res;
    l[one][st] = 1;
  } else
    return;
  if (k == 0 || st >= n) return;
  if (mx[st] > 0 && p[one] > 0) loop(st + 1, st + 2, k - 1);
  if (mx[st] < 100 && p[one] > 0) loop(one, st + 1, k - 1);
  if (mx[st] > 0 && p[one] < 100) loop(st, st + 1, k - 1);
}
int main() {
  int k;
  cin >> n >> k;
  for (int i = 0; i < n; ++i) cin >> p[i];
  mn[n - 1] = p[n - 1];
  mx[n - 1] = p[n - 1];
  for (int i = n - 2; i >= 0; --i) {
    mn[i] = min(p[i], mn[i + 1]);
    mx[i] = max(p[i], mx[i + 1]);
  }
  loop(0, 1, k);
  cout << res << endl;
  return 0;
}
