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