#include <bits/stdc++.h>
using namespace std;
const int MAXN = 4 * 1000 + 10, INF = INT_MAX, MOD = 1e9 + 7;
bool mark[MAXN][MAXN];
int dis[MAXN][MAXN], mx[MAXN];
queue<pair<int, int> > q;
int n, k;
void push(int x, int y, int d) {
  y = min(y, n);
  if (x > n || mark[x][y]) return;
  mark[x][y] = true;
  dis[x][y] = d;
  q.push(make_pair(x, y));
}
int a[MAXN];
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = n - 1; i >= 0; i--) mx[i] = max(mx[i + 1], a[i]);
  q.push(make_pair(0, 1));
  mark[0][1] = true;
  int ans = 0;
  while (!q.empty()) {
    int x = q.front().first, y = q.front().second, d = dis[x][y] + 1;
    q.pop();
    ans++;
    if (d > k) continue;
    if (mx[y] > 0 && a[x] > 0) push(y + 1, y + 2, d);
    if (mx[y] < 100 && a[x] > 0) push(x, y + 1, d);
    if (mx[y] > 0 && a[x] < 100) push(y, y + 1, d);
  }
  cout << ans << endl;
  return 0;
}
