#include <bits/stdc++.h>
using namespace std;
int prob[3010];
int Status[3010][3010];
struct ST {
  int x, y;
};
ST newST(int a, int b) {
  ST re;
  re.x = a, re.y = b;
  return re;
}
deque<ST> BFS;
bool vempty = false;
int cnt = 1;
void visit(int a, int b, int k) {
  if (Status[a][b] > k) {
    if (Status[a][b] == 4000) cnt++;
    Status[a][b] = k;
    BFS.push_back(newST(a, b));
  }
}
int main() {
  BFS.clear();
  int n, k;
  int Dead_ptr, Undead_ptr;
  scanf("%d %d", &n, &k);
  for (int lx = 0; lx <= n; lx++)
    for (int ly = 0; ly <= n; ly++) Status[lx][ly] = 4000;
  Dead_ptr = 0;
  Undead_ptr = n + 1;
  for (int lx = 1; lx <= n; lx++) {
    scanf("%d", prob + lx);
    if (prob[lx] == 100) Dead_ptr = lx;
  }
  for (int lx = n; (prob[lx] == 0) && lx; lx--) Undead_ptr = lx;
  BFS.push_back(newST(n, n - 1));
  Status[n][n - 1] = 0;
  while (BFS.size()) {
    ST out = BFS.front();
    BFS.pop_front();
    int ptr1 = n - out.x + 1;
    if (Status[out.x][out.y] >= k) break;
    if ((n - out.y + 1) >= Undead_ptr) {
      if (prob[ptr1] > 0) visit(out.x, out.y - 1, Status[out.x][out.y] + 1);
      continue;
    }
    if (out.y == 0) continue;
    if (prob[ptr1] > 0) {
      if (out.y == 1)
        vempty = true;
      else
        visit(out.y - 1, out.y - 2, Status[out.x][out.y] + 1);
    }
    if (prob[ptr1] < 100) visit(out.y, out.y - 1, Status[out.x][out.y] + 1);
    if (n - out.x + 1 < Dead_ptr) continue;
    if (prob[ptr1] > 0) visit(out.x, out.y - 1, Status[out.x][out.y] + 1);
  }
  printf("%d\n", cnt + vempty);
  return 0;
}
