#include <bits/stdc++.h>
using namespace std;
const int maxn = 3050;
const int inf = 1e9 + 7;
int dist[maxn][maxn];
int mx[maxn], p[maxn];
int u, v, uu, vv, D;
int n, k;
queue<pair<int, int> > q;
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) scanf("%d", p + i);
  mx[n] = 0;
  for (int i = n - 1; i >= 0; i--) mx[i] = max(mx[i + 1], p[i]);
  for (int i = 0; i < n + 1; i++)
    for (int j = i + 1; j < n + 2; j++) dist[i][j] = inf;
  dist[0][1] = 0;
  q.push(make_pair(0, 1));
  while (!q.empty()) {
    u = q.front().first;
    v = q.front().second;
    q.pop();
    D = dist[u][v];
    if (dist[u][v] > k) break;
    if (v >= n) continue;
    if (mx[v] < 100 and p[u] > 0) {
      if (dist[u][v + 1] == inf) {
        dist[u][v + 1] = D + 1;
        q.push(make_pair(u, v + 1));
      }
    }
    if (mx[v]) {
      if (p[u] != 100) {
        if (dist[v][v + 1] == inf) {
          dist[v][v + 1] = D + 1;
          q.push(make_pair(v, v + 1));
        }
      }
      if (p[u] != 0) {
        if (dist[v + 1][v + 2] == inf) {
          dist[v + 1][v + 2] = D + 1;
          q.push(make_pair(v + 1, v + 2));
        }
      }
    }
  }
  int ans = 0;
  for (int i = 0; i < n + 1; i++)
    for (int j = i + 1; j < n + 2; j++)
      if (dist[i][j] <= k) ans++;
  cout << ans << endl;
  return 0;
}
