#include <bits/stdc++.h>
using namespace std;
int p[3010], a[3010];
int u[3010][3010];
int l[3010 * 3010][2], w, r;
void add(int x, int y, int z) {
  if (u[x][y] >= 0) return;
  u[x][y] = z;
  l[w][0] = x;
  l[w][1] = y;
  w++;
}
int main() {
  int n, i, j, k;
  scanf("%d%d", &n, &k);
  for (i = 0; i < n; i++) scanf("%d", &p[i]);
  a[n] = 0;
  for (i = n - 1; i >= 0; i--) a[i] = max(a[i + 1], p[i]);
  for (i = 0; i <= n; i++) {
    for (j = i + 1; j <= n + 1; j++) {
      u[i][j] = -1;
    }
  }
  l[0][0] = 0;
  l[0][1] = 1;
  r = 0;
  w = 1;
  u[0][1] = 0;
  while (r < w) {
    i = l[r][0];
    j = l[r][1];
    r++;
    int kk = u[i][j] + 1;
    if (kk > k) break;
    if (j >= n) continue;
    if (a[j] > 0 && p[i] > 0) add(j + 1, j + 2, kk);
    if (a[j] < 100 && p[i] > 0) add(i, j + 1, kk);
    if (a[j] > 0 && p[i] < 100) add(j, j + 1, kk);
  }
  printf("%d\n", w);
  return 0;
}
