#include <bits/stdc++.h>
using namespace std;
int i, j, n, k, p[3030], maxp[3030];
int ok[3030][3030], ans, h;
void make(int *p1, int *p2) {
  if (*p2 == 0)
    *p2 = *p1 + 1, ans++;
  else
    *p2 = min(*p1 + 1, *p2);
}
int main() {
  scanf("%d %d", &n, &k);
  for (i = 1; i <= n; i++) scanf("%d", p + i);
  for (i = n; i >= 1; i--) maxp[i] = max(p[i], maxp[i + 1]);
  ok[1][2] = 1;
  ans = 1;
  for (i = 1; i <= n; i++)
    for (j = i + 1; j <= n; j++) {
      if (ok[i][j] && ok[i][j] <= k) {
        if (p[i] > 0 && maxp[j] < 100) make(&ok[i][j], &ok[i][j + 1]);
        if (p[i] < 100 && maxp[j] > 0) make(&ok[i][j], &ok[j][j + 1]);
        if (p[i] > 0 && maxp[j] > 0) make(&ok[i][j], &ok[j + 1][j + 2]);
      }
    }
  printf("%d\n", ans);
  return 0;
}
