#include <bits/stdc++.h>
using namespace std;
const int INF = (int)(1e9);
const int N = (int)(4e3 + 20);
int n, k;
int d[N][N];
int p[N];
bool canKillMe[N];
bool mustKillMe[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> k;
  if (n == 1) {
    cout << 1;
    return 0;
  }
  for (int i = 1; i <= n; ++i) cin >> p[i];
  for (int i = n - 1; i > 0; --i) {
    canKillMe[i] = canKillMe[i + 1] || p[i + 1] > 0;
    mustKillMe[i] = mustKillMe[i + 1] || p[i + 1] == 100;
  }
  memset(d, -1, N * N * sizeof(int));
  d[1][2] = 0;
  queue<int> q;
  q.push(1);
  q.push(2);
  bool doubleKill = false;
  while (!q.empty()) {
    int l = q.front();
    q.pop();
    int t = q.front();
    q.pop();
    if (l == t) continue;
    if (t == n && p[t] > 0 && p[l] > 0) doubleKill = true;
    if (canKillMe[t - 1] && p[l] < 100) {
      if (t == n && d[t][t] < 0) {
        d[t][t] = 1 + d[l][t];
      }
      if (t < n && d[t][t + 1] < 0) {
        d[t][t + 1] = 1 + d[l][t];
        q.push(t);
        q.push(t + 1);
      }
    }
    if (p[l] > 0 && !mustKillMe[t - 1]) {
      if (t == n && d[l][l] < 0) {
        d[l][l] = 1 + d[l][t];
      }
      if (t < n && d[l][t + 1] < 0) {
        d[l][t + 1] = 1 + d[l][t];
        q.push(l);
        q.push(t + 1);
      }
    }
    if (p[l] > 0 && canKillMe[t - 1]) {
      if (t == n && d[0][0] < 0) {
        d[0][0] = 1 + d[l][t];
      }
      if (t < n) {
        int nl = t + 1;
        int nt = min(n, t + 2);
        if (d[nl][nt] < 0) {
          d[nl][nt] = 1 + d[l][t];
          q.push(nl);
          q.push(nt);
        }
      }
    }
  }
  int ans = 0;
  for (int i = 0; i <= n; ++i) {
    for (int j = 0; j <= n; ++j) {
      if (d[i][j] >= 0 && d[i][j] <= k) ++ans;
    }
  }
  cout << ans;
  return 0;
}
