#include <bits/stdc++.h>
using namespace std;
int n, k, a[3003], mx[3003];
int v[3003][3003];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  mx[n - 1] = a[n - 1];
  for (int i = n - 2; i >= 0; --i) {
    mx[i] = max(mx[i + 1], a[i]);
  }
  memset(v, -1, sizeof(v));
  queue<pair<int, int> > q;
  q.push({0, 1});
  v[0][1] = 0;
  int ans = 0;
  while (!q.empty()) {
    ans++;
    int x = q.front().first;
    int y = q.front().second;
    q.pop();
    if (y >= n) continue;
    if (v[x][y] == k) continue;
    if (a[x] > 0 && mx[y] > 0) {
      if (v[y + 1][y + 2] == -1) {
        q.push({y + 1, y + 2});
        v[y + 1][y + 2] = v[x][y] + 1;
      }
    }
    if (a[x] < 100 && mx[y] > 0) {
      if (v[y][y + 1] == -1) {
        q.push({y, y + 1});
        v[y][y + 1] = v[x][y] + 1;
      }
    }
    if (a[x] > 0 && mx[y] < 100) {
      if (v[x][y + 1] == -1) {
        q.push({x, y + 1});
        v[x][y + 1] = v[x][y] + 1;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
