#include <bits/stdc++.h>
using namespace std;
const int N = 3010;
int n, k, d[N][N], p[N];
bool can[N], can_not[N];
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> p[i];
  for (int i = n; i >= 1; i--) can[i] = can[i + 1] | p[i];
  can_not[n + 1] = true;
  for (int i = n; i >= 1; i--) can_not[i] = can_not[i + 1] && (p[i] != 100);
  for (int i = 0; i < N; i++)
    for (int j = 0; j < N; j++) d[i][j] = 1 << 30;
  queue<pair<int, int>> q;
  q.push({1, 2}), d[1][2] = 0;
  int ans = 0;
  while (q.size()) {
    pair<int, int> x = q.front();
    q.pop();
    int f = x.first, s = x.second;
    if (d[f][s] > k) break;
    ans++;
    if (p[f] && can_not[s] && d[f][s + 1] > d[f][s] + 1 && s <= n) {
      d[f][s + 1] = d[f][s] + 1;
      q.push({f, s + 1});
    }
    if (can[s] && p[f] != 100 && d[s][s + 1] > d[f][s] + 1) {
      d[s][s + 1] = d[f][s] + 1;
      q.push({s, s + 1});
    }
    if (can[s] && p[f] && d[s + 1][s + 2] > d[f][s] + 1) {
      d[s + 1][s + 2] = d[f][s] + 1;
      q.push({s + 1, s + 2});
    }
  }
  cout << ans << '\n';
  return 0;
}
