#include <bits/stdc++.h>
using namespace std;
int n, k, ans;
int p[3005], maxp[3005];
int dis[3005][3005];
queue<pair<int, int> > Q;
void bfs() {
  while (!Q.empty()) Q.pop();
  memset(dis, -1, sizeof(dis));
  dis[0][1] = 0;
  Q.push(make_pair(0, 1));
  int l, r;
  while (!Q.empty()) {
    l = Q.front().first;
    r = Q.front().second;
    Q.pop();
    if (r >= n) continue;
    if (maxp[r] && p[l] != 100 && dis[r][r + 1] == -1) {
      dis[r][r + 1] = dis[l][r] + 1;
      if (dis[r][r + 1] <= k) ans++;
      Q.push(make_pair(r, r + 1));
    }
    if (maxp[r] != 100 && p[l] && dis[l][r + 1] == -1) {
      dis[l][r + 1] = dis[l][r] + 1;
      if (dis[l][r + 1] <= k) ans++;
      Q.push(make_pair(l, r + 1));
    }
    if (maxp[r] && p[l] && dis[r + 1][r + 2] == -1) {
      dis[r + 1][r + 2] = dis[l][r] + 1;
      if (dis[r + 1][r + 2] <= k) ans++;
      Q.push(make_pair(r + 1, r + 2));
    }
  }
}
int main() {
  scanf("%d%d", &n, &k);
  int i;
  for (i = 0; i < n; ++i) scanf("%d", p + i);
  maxp[n] = 0;
  for (i = n - 1; i >= 0; --i) maxp[i] = max(maxp[i + 1], p[i]);
  ans = 1;
  bfs();
  printf("%d\n", ans);
  return 0;
}
