#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
void upmin(T& a, const U& b) {
  a = min<T>(a, b);
}
template <typename T, typename U>
void upmax(T& a, const U& b) {
  a = max<T>(a, b);
}
template <typename T>
void uniq(T& a) {
  sort(a.begin(), a.end());
  a.erase(unique(a.begin(), a.end()), a.end());
}
void fast_io() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}
bool in_rect(int x, int y, int w, int h) {
  return 0 <= x && x < w && 0 <= y && y < h;
}
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
int main() {
  int n, k, p[3333];
  cin >> n >> k;
  for (int i = 0; i < (int)(n); i++) cin >> p[i];
  int max_p[3333];
  max_p[n] = 0;
  for (int i = n - 1; i >= 0; i--) max_p[i] = max(p[i], max_p[i + 1]);
  int res = 0;
  int dp[3333];
  fill_n(dp, n + 10, 1919810);
  dp[0] = 0;
  for (int i = 0; i < (int)(n - 1); i++) {
    if (dp[i] >= k) continue;
    if (p[i] == 0) {
      if (max_p[i + 1] > 0) upmin(dp[i + 1], dp[i] + 1);
    } else {
      int rem = k - dp[i];
      if (max_p[i + 1] == 100) rem = 1;
      for (int t = 1; t <= rem && i + t < n; t++) {
        if (p[i] < 100 && max_p[i + t] > 0) upmin(dp[i + t], dp[i] + t);
        if (max_p[i + t] > 0) upmin(dp[i + 1 + t], dp[i] + t);
        if (max_p[i + t] < 100) res++;
      }
    }
  }
  for (int i = 0; i < (int)(n + 1); i++)
    if (dp[i] <= k) res++;
  cout << res << endl;
}
