#include <bits/stdc++.h>
using namespace std;
int p[3010], n, a[3010], b[3010], d[3010][3010];
int main() {
  int i, j, m, k;
  while (~scanf("%d%d", &n, &k)) {
    for (i = 0; i < n; i++)
      scanf("%d", &p[i]), a[i] = (p[i] == 100), b[i] = (p[i] == 0);
    for (i = n - 2; i >= 0; i--) {
      a[i] |= a[i + 1];
      b[i] &= b[i + 1];
    }
    if (n == 1 || b[0]) {
      puts("1");
      continue;
    }
    queue<pair<int, int> > q;
    q.push(make_pair(0, 1));
    memset(d, -1, sizeof(d));
    d[0][1] = 0;
    int zero = 0, ans = 0;
    while (!q.empty()) {
      int first = q.front().first, second = q.front().second;
      q.pop();
      if (first >= n) {
        zero |= 1;
        continue;
      }
      if (d[first][second] <= k) ans++;
      if (d[first][second] == k || second >= n) continue;
      if (!a[second] && p[first] > 0 && d[first][second + 1] == -1) {
        d[first][second + 1] = d[first][second] + 1;
        q.push(make_pair(first, second + 1));
      }
      if (!b[second] && p[first] < 100 && d[second][second + 1] == -1) {
        d[second][second + 1] = d[first][second] + 1;
        q.push(make_pair(second, second + 1));
      }
      if (!b[second] && p[first] > 0 && d[second + 1][second + 2] == -1) {
        d[second + 1][second + 2] = d[first][second] + 1;
        q.push(make_pair(second + 1, second + 2));
      }
    }
    printf("%d\n", ans + zero);
  }
}
