#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
const int ZCY = 1000000007;
const double eps = 1e-8;
inline int getint() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline void outputint(int x) {
  char ch[12];
  int cnt = 0;
  if (x == 0) {
    putchar('0');
    putchar(10);
    return;
  }
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  while (x) ch[++cnt] = x % 10, x /= 10;
  while (cnt) putchar(ch[cnt--] + 48);
  putchar(10);
}
int p[(3005)], maxP[(3005)];
bool vis[(3005)][(3005)];
int N, K, Ans;
void init() {
  N = getint(), K = getint();
  for (int i = 1; i <= N; i++) p[i] = getint();
  for (int i = N; i; i--) maxP[i] = max(maxP[i + 1], p[i]);
}
void dfs(int x, int y, int cur) {
  if (vis[x][y]) return;
  vis[x][y] = true;
  Ans++;
  if (cur == K || y > N) return;
  if (p[x]) {
    if (maxP[y]) dfs(y + 1, y + 2, cur + 1);
    if (maxP[y] != 100) dfs(x, y + 1, cur + 1);
  }
  if (p[x] != 100 && maxP[y]) dfs(y, y + 1, cur + 1);
}
void work() {
  dfs(1, 2, 0);
  outputint(Ans);
}
int main() {
  init();
  work();
  return 0;
}
