#include <bits/stdc++.h>
using namespace std;
const int Maxn = 3010;
int p[Maxn], dis[Maxn][Maxn];
int n, k;
bool One[Maxn], zero[Maxn];
inline void updateMin(int &x, int val) { x = min(x, val); }
void init() {
  zero[n] = true;
  One[n] = false;
  for (int i = n - 1; i >= 0; i--) {
    One[i] = One[i + 1] || (p[i] == 100);
    zero[i] = zero[i + 1] && p[i] == 0;
  }
}
bool hasOne(int ind) { return One[ind]; }
bool allZero(int ind) { return zero[ind]; }
bool maintain(int l, int r) { return true; }
void debug() {
  for (int i = 0; i <= n + 1; i++, puts(""))
    for (int j = 0; j <= n + 1; j++) printf("%d ", dis[i][j]);
}
int solve() {
  int ans = 0;
  for (int i = 0; i <= n + 1; i++)
    for (int j = 0; j <= n + 1; j++) dis[i][j] = k + 1;
  dis[0][1] = 0;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      if (p[i] && !hasOne(j)) updateMin(dis[i][j + 1], dis[i][j] + 1);
      if (p[i] && !allZero(j)) updateMin(dis[j + 1][j + 2], dis[i][j] + 1);
      if (p[i] != 100 && !allZero(j)) updateMin(dis[j][j + 1], dis[i][j] + 1);
    }
  for (int i = 0; i <= n + 1; i++)
    for (int j = 0; j <= n + 1; j++)
      if (dis[i][j] <= k) ans++;
  return ans;
}
int main() {
  while (~scanf("%d%d", &n, &k)) {
    for (int i = 0; i < n; i++) scanf("%d", &p[i]);
    init();
    printf("%d\n", solve());
  }
}
