#include <bits/stdc++.h>
using namespace std;
int n, k;
int d[3003][3003];
int p[3003];
int maxp[3003];
queue<pair<int, int> > q;
void add(int x1, int y1, int x2, int y2) {
  if (d[x2][y2] < 0 && d[x1][y1] + 1 <= k) {
    d[x2][y2] = d[x1][y1] + 1;
    q.push(make_pair(x2, y2));
  }
}
void bfs() {
  d[0][1] = 0;
  q.push(make_pair(0, 1));
  while (!q.empty()) {
    pair<int, int> v = q.front();
    q.pop();
    int a = v.first, b = v.second;
    if (b >= n) continue;
    int ma = maxp[b];
    if (ma > 0 && p[a] > 0) add(a, b, b + 1, b + 2);
    if (ma > 0 && p[a] < 100) add(a, b, b, b + 1);
    if (ma < 100 && p[a] > 0) add(a, b, a, b + 1);
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) scanf("%d", &p[i]);
  maxp[n - 1] = p[n - 1];
  for (int i = n - 2; i >= 0; i--) maxp[i] = max(maxp[i + 1], p[i]);
  memset(d, -1, sizeof(d));
  bfs();
  int ans = 0;
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= n + 1; j++)
      if (d[i][j] >= 0 && d[i][j] <= k) ans++;
  printf("%d\n", ans);
  return 0;
}
