#include <bits/stdc++.h>
using namespace std;
bool vis[3005][3005];
struct State {
  int a, b, s, psum, p100cnt;
} tmp;
int main() {
  int prob[3005] = {}, n, k, i, ans = 0;
  queue<State> q;
  scanf("%d%d", &n, &k);
  for (i = 0; i < n; i++) {
    scanf("%d", &prob[i]);
    tmp.psum += prob[i];
    tmp.p100cnt += (prob[i] == 100);
  }
  tmp.psum -= prob[0];
  tmp.p100cnt -= (prob[0] == 100);
  tmp.a = 0;
  tmp.b = 1;
  tmp.s = 0;
  q.push(tmp);
  while (!q.empty()) {
    State now = q.front();
    q.pop();
    ans++;
    if (now.s >= k) continue;
    if (now.b >= n) continue;
    if (prob[now.a] != 0 && now.psum != 0) {
      tmp = (State){.a = now.b + 1,
                    .b = now.b + 2,
                    .s = now.s + 1,
                    .psum = now.psum - prob[now.b] - prob[now.b + 1],
                    .p100cnt = now.p100cnt - (prob[now.b] == 100) -
                               (prob[now.b + 1] == 100)};
      if (!vis[tmp.a][tmp.b]) {
        vis[tmp.a][tmp.b] = 1;
        q.push(tmp);
      }
    }
    if (prob[now.a] != 0 && !now.p100cnt) {
      tmp = (State){.a = now.a,
                    .b = now.b + 1,
                    .s = now.s + 1,
                    .psum = now.psum - prob[now.b],
                    .p100cnt = now.p100cnt - (prob[now.b] == 100)};
      if (!vis[tmp.a][tmp.b]) {
        vis[tmp.a][tmp.b] = 1;
        q.push(tmp);
      }
    }
    if (prob[now.a] != 100 && now.psum != 0) {
      tmp = (State){.a = now.b,
                    .b = now.b + 1,
                    .s = now.s + 1,
                    .psum = now.psum - prob[now.b],
                    .p100cnt = now.p100cnt - (prob[now.b] == 100)};
      if (!vis[tmp.a][tmp.b]) {
        vis[tmp.a][tmp.b] = 1;
        q.push(tmp);
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
