#include <bits/stdc++.h>
using namespace std;
queue<pair<int, int> > q;
int p[3005], c1[3005], c2[3005], d[3005][3005];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) scanf("%d", &p[i]);
  for (int i = n - 1; i >= 0; i--) {
    if (i != n - 1) c1[i] = c1[i + 1];
    if (p[i] > 0) c1[i] += 1;
    if (i != n - 1) c2[i] = c2[i + 1];
    if (p[i] == 100) c2[i] += 1;
  }
  q.push(make_pair(0, 1));
  d[0][1] = 1;
  int ans = 1;
  while (!q.empty()) {
    pair<int, int> pii = q.front();
    q.pop();
    int x = pii.first, y = pii.second;
    if (x >= n || y >= n || d[x][y] > k) continue;
    if (p[x] > 0 && c2[y] == 0 && d[x][y + 1] == 0) {
      d[x][y + 1] = d[x][y] + 1;
      ans++;
      q.push(make_pair(x, y + 1));
    }
    if (p[x] != 100 && c1[y] > 0 && d[y][y + 1] == 0) {
      d[y][y + 1] = d[x][y] + 1;
      ans++;
      q.push(make_pair(y, y + 1));
    }
    if (p[x] > 0 && c1[y] > 0 && d[y + 1][y + 2] == 0) {
      d[y + 1][y + 2] = d[x][y] + 1;
      ans++;
      q.push(make_pair(y + 1, y + 2));
    }
  }
  cout << ans << endl;
  return 0;
}
