#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
const int N = 5000000;
int n;
int m;
pair<int, int> q[N];
int was[3010][3010];
int p[3010];
int s[3010];
int f[3010];
int k;
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) scanf("%d", &p[i]);
  s[n] = 0;
  for (int i = n - 1; i >= 0; i--) {
    s[i] = s[i + 1] + p[i];
    f[i] = f[i + 1] | int(p[i] == 100);
  }
  int l = 0, r = 1;
  q[0] = make_pair(0, 1);
  was[0][1] = 1;
  while (l < r) {
    int x = q[l].first;
    int y = q[l].second;
    l++;
    if (y < n && was[x][y] <= k) {
      if (p[x] < 100 && s[y] > 0 && !was[y][y + 1]) {
        was[y][y + 1] = was[x][y] + 1;
        q[r++] = make_pair(y, y + 1);
      }
      if (p[x] > 0 && !f[y] && !was[x][y + 1]) {
        was[x][y + 1] = was[x][y] + 1;
        q[r++] = make_pair(x, y + 1);
      }
      if (p[x] > 0 && s[y] > 0 && !was[y + 1][y + 2]) {
        was[y + 1][y + 2] = was[x][y] + 1;
        q[r++] = make_pair(y + 1, y + 2);
      }
    }
  }
  printf("%d\n", r);
  return 0;
}
