#include <bits/stdc++.h>
using namespace std;
int p[3333], mx[3333];
int dis[3333][3333];
queue<pair<int, int> > q;
int main() {
  int N, K;
  scanf("%d %d", &N, &K);
  for (int i = 0; i < N; i++) scanf("%d", p + i);
  for (int i = N - 1; i >= 0; i--) mx[i] = max(mx[i + 1], p[i]);
  memset(dis, 0x3f, sizeof(dis));
  dis[0][1] = 0;
  q.push(pair<int, int>(0, 1));
  while (!q.empty()) {
    int u = q.front().first;
    int v = q.front().second;
    q.pop();
    if (v >= N) continue;
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 2; j++) {
        if (mx[v] == 0 && !i || mx[v] == 100 && i) continue;
        if (p[u] == 0 && !j || p[u] == 100 && j) continue;
        int uu = i ? u : v + (!j);
        int vv = i ? v + (!j) : v + 1 + (!j);
        if (dis[uu][vv] > dis[u][v] + 1) {
          dis[uu][vv] = dis[u][v] + 1;
          q.push(pair<int, int>(uu, vv));
        }
      }
    }
  }
  int ans = 0;
  for (int i = 0; i <= N; i++) {
    for (int j = i + 1; j <= N + 1; j++) {
      if (dis[i][j] <= K) ans++;
    }
  }
  printf("%d\n", ans);
  return 0;
}
