#include <bits/stdc++.h>
int N, K, a[3004], b[3004], res, d[3004][3004];
void dfs(int k, int x, int y) {
  if (d[x][y] == 1) {
    return;
  }
  d[x][y] = 1;
  res++;
  if (k == 0 || y >= N) {
    return;
  }
  if (a[x] != 0 && b[y] != 0) {
    dfs(k - 1, y + 1, y + 2);
  }
  if (a[x] != 0 && b[y] != 100) {
    dfs(k - 1, x, y + 1);
  }
  if (b[y] != 0 && a[x] != 100) {
    dfs(k - 1, y, y + 1);
  }
}
int main() {
  int i;
  memset(a, 0, sizeof(a));
  memset(b, 0, sizeof(b));
  memset(d, 0, sizeof(d));
  res = 0;
  scanf("%d %d", &N, &K);
  for (i = 0; i < N; i++) {
    scanf("%d", &a[i]);
  }
  for (i = N - 1; i >= 0; i--) {
    if (b[i + 1] > a[i]) {
      b[i] = b[i + 1];
    } else {
      b[i] = a[i];
    }
  }
  dfs(K, 0, 1);
  printf("%d\n", res);
  return 0;
}
