#include <bits/stdc++.h>
using namespace std;
int p[4000];
int pp[4000][3];
int d[4000][4000];
int main() {
  int i, j, k, n, x, y, tmpx, tmpy;
  vector<pair<int, int> > q;
  scanf("%d%d", &n, &k);
  for (i = 0; i < n; i++) scanf("%d", &p[i]);
  pp[n][0] = 1;
  pp[n][1] = 0;
  for (i = n - 1; i >= 0; i--) {
    pp[i][0] = pp[i + 1][0];
    pp[i][1] = pp[i + 1][1];
    if (p[i] > 0) pp[i][1] = 1;
    if (p[i] == 100) pp[i][0] = 0;
  }
  memset(d, -1, sizeof(d));
  d[0][1] = 0;
  q.clear();
  q.push_back(make_pair(0, 1));
  for (i = 0; i < q.size(); i++) {
    x = q[i].first;
    y = q[i].second;
    if (y >= n) continue;
    if (d[x][y] >= k) continue;
    for (j = 1; j < 4; j++) {
      if ((p[x] == 100) && ((j & 2) == 0)) continue;
      if ((p[x] == 0) && ((j & 2) != 0)) continue;
      if ((pp[y][0] == 0) && ((j & 1) == 0)) continue;
      if ((pp[y][1] == 0) && ((j & 1) != 0)) continue;
      if (j == 3) {
        tmpx = y + 1;
        tmpy = y + 2;
      } else if (j == 2) {
        tmpx = x;
        tmpy = y + 1;
      } else if (j == 1) {
        tmpx = y;
        tmpy = y + 1;
      }
      if (d[tmpx][tmpy] == -1) {
        d[tmpx][tmpy] = d[x][y] + 1;
        q.push_back(make_pair(tmpx, tmpy));
      }
    }
  }
  printf("%d\n", (int)q.size());
  return 0;
}
