#include <bits/stdc++.h>
using namespace std;
const int N = 4000;
int n, k, p[N], n100[N], n0[N], h[N][N], ans;
queue<pair<int, int> > q;
void bfs(int f, int s) {
  ans = 1;
  h[f][s] = 0;
  q.push(make_pair(f, s));
  while (!q.empty()) {
    pair<int, int> v = q.front();
    q.pop();
    if (h[v.first][v.second] >= k || v.first >= n || v.second >= n) continue;
    if (h[v.first][v.second + 1] == -1 && p[v.first] > 0 &&
        n100[v.second] == 0) {
      h[v.first][v.second + 1] = h[v.first][v.second] + 1;
      ans++;
      q.push(make_pair(v.first, v.second + 1));
    }
    if (h[v.second][v.second + 1] == -1 && p[v.first] < 100 &&
        n0[v.second] > 0) {
      h[v.second][v.second + 1] = h[v.first][v.second] + 1;
      ans++;
      q.push(make_pair(v.second, v.second + 1));
    }
    if (h[v.second + 1][v.second + 2] == -1 && p[v.first] > 0 &&
        n0[v.second] > 0) {
      h[v.second + 1][v.second + 2] = h[v.first][v.second] + 1;
      ans++;
      q.push(make_pair(v.second + 1, v.second + 2));
    }
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  memset(h, -1, sizeof h);
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> p[i];
  for (int i = n - 1; i >= 0; i--) {
    if (i != n - 1) {
      n0[i] = n0[i + 1];
      n100[i] = n100[i + 1];
    }
    if (p[i] > 0) n0[i]++;
    if (p[i] == 100) n100[i]++;
  }
  bfs(0, 1);
  cout << ans << endl;
  return 0;
}
