#include <bits/stdc++.h>
using namespace std;
const int MAX_BUF_SIZE = 16384;
char BUFOR[MAX_BUF_SIZE];
int BUF_SIZE, BUF_POS;
char ZZZ;
int _MINUS;
const int MXN = 3010;
const int C = 262144;
const int INF = 1000000001;
int n, k;
int a[MXN];
int p[MXN];
int D[MXN];
int suf[MXN];
int suf2[MXN];
int czyZera[MXN];
int dist[MXN][MXN];
void test() {
  scanf("%d %d", &n, &k);
  for (int i = (1); i <= (n); i++) {
    int P;
    scanf("%d", &P);
    if (P == 0)
      p[i] = 0;
    else if (P < 100)
      p[i] = 1;
    else
      p[i] = 2;
  }
  for (int i = (n); i >= (1); i--) {
    suf[i] = suf[i + 1] + (p[i] == 2);
    suf2[i] = suf2[i + 1] + (p[i] == 0);
    czyZera[i] = (suf2[i] == n - i + 1);
  }
  for (int i = (1); i <= (n + 2); i++)
    for (int j = (1); j <= (n + 2); j++) dist[i][j] = INF;
  dist[1][2] = 0;
  queue<pair<int, int> > Q;
  Q.push(make_pair(1, 2));
  int res = 0;
  int pusty = 0;
  while (!Q.empty()) {
    pair<int, int> p1 = Q.front();
    Q.pop();
    int x = p1.first;
    int y = p1.second;
    int d = dist[x][y];
    if (d > k) continue;
    res++;
    if (y > n) {
      if (x > n) {
        pusty = 1;
        res--;
      }
      continue;
    }
    if (d > k) continue;
    if (p[x] > 0 && suf[y] == 0 && dist[x][y + 1] == INF) {
      dist[x][y + 1] = d + 1;
      Q.push(make_pair(x, y + 1));
    }
    if (!(p[x] == 2) && czyZera[y] == 0 && dist[y][y + 1] == INF) {
      dist[y][y + 1] = d + 1;
      Q.push(make_pair(y, y + 1));
    }
    if (p[x] > 0 && !czyZera[y] && dist[y + 1][y + 2] == INF) {
      dist[y + 1][y + 2] = d + 1;
      Q.push(make_pair(y + 1, y + 2));
    }
  }
  printf("%d\n", res + pusty);
}
int main() {
  int te = 1;
  while (te--) test();
  return 0;
}
