#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)(3000 + 10);
const int INF = (int)(1e9 + 7);
int n;
int k;
int ans;
int p[MAXN];
int isnot0[MAXN];
int is100[MAXN];
bool used[MAXN][MAXN];
int d[MAXN][MAXN];
int one[MAXN];
void bfs() {
  queue<pair<int, int> > q;
  d[1][2] = 0;
  q.push(make_pair(1, 2));
  while (!q.empty()) {
    pair<int, int> cur = q.front();
    q.pop();
    used[cur.first][cur.second] = true;
    if (d[cur.first][cur.second] <= k) {
      if (cur.first <= n && cur.second <= n) {
        if (0) cout << cur.first << " " << cur.second << endl;
        ans++;
      } else if (cur.first > n && cur.second > n && !one[0]) {
        one[0] = true;
        ans++;
        if (0) cout << cur.first << " " << cur.second << endl;
      } else if (cur.first <= n && cur.second > n && !one[cur.first]) {
        ans++;
        one[cur.first] = true;
        if (0) cout << cur.first << " " << cur.second << endl;
        continue;
      }
    } else {
      continue;
    }
    if (p[cur.first] > 0 && isnot0[cur.second] &&
        !used[cur.second + 1][cur.second + 2]) {
      if (cur.second + 2 <= n + 2) {
        q.push(make_pair(cur.second + 1, cur.second + 2));
        d[cur.second + 1][cur.second + 2] = d[cur.first][cur.second] + 1;
        used[cur.second + 1][cur.second + 2] = true;
      }
    }
    if (p[cur.first] > 0 && !is100[cur.second] &&
        !used[cur.first][cur.second + 1]) {
      if (cur.second + 1 <= n + 2) {
        q.push(make_pair(cur.first, cur.second + 1));
        d[cur.first][cur.second + 1] = d[cur.first][cur.second] + 1;
        used[cur.first][cur.second + 1] = true;
      }
    }
    if (isnot0[cur.second] && p[cur.first] != 100 &&
        !used[cur.second][cur.second + 1]) {
      if (cur.second + 1 <= n + 2) {
        q.push(make_pair(cur.second, cur.second + 1));
        d[cur.second][cur.second + 1] = d[cur.first][cur.second] + 1;
        used[cur.second][cur.second + 1] = true;
      }
    }
  }
}
int main() {
  cin >> n;
  cin >> k;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
  }
  if (n == 1) {
    cout << 1 << endl;
    return 0;
  }
  for (int i = n; i >= 1; i--) {
    isnot0[i] = max((int)(p[i] != 0), isnot0[i + 1]);
    is100[i] = max((int)(p[i] == 100), is100[i + 1]);
  }
  bfs();
  cout << ans << endl;
}
