#include <bits/stdc++.h>
using namespace std;
int d[3100][3100];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, k;
  cin >> n >> k;
  vector<long double> p(n);
  vector<int> pref(n);
  vector<int> full(n);
  for (long double &e : p) {
    cin >> e;
  }
  pref[n - 1] = p[n - 1] != 0;
  for (int i = n - 2; i >= 0; i--) {
    pref[i] = pref[i + 1] + (p[i] != 0);
  }
  full[n - 1] = p[n - 1] == 100;
  for (int i = n - 2; i >= 0; i--) {
    full[i] = full[i + 1] + (p[i] == 100);
  }
  queue<pair<int, int>> q;
  q.push({0, 1});
  int cnt = 0;
  d[0][1] = 1;
  while (!q.empty()) {
    pair<int, int> t = q.front();
    q.pop();
    cnt++;
    if (t.first == n || t.second == n) {
      continue;
    }
    if (d[t.first][t.second] == k + 1) {
      continue;
    }
    if (p[t.first] > 0 && full[t.second] == 0 && !d[t.first][t.second + 1]) {
      d[t.first][t.second + 1] = d[t.first][t.second] + 1;
      q.push({t.first, t.second + 1});
    }
    if (p[t.first] > 0 && pref[t.second] > 0 &&
        !d[t.second + 1][t.second + 2]) {
      d[t.second + 1][t.second + 2] = d[t.first][t.second] + 1;
      q.push({t.second + 1, t.second + 2});
    }
    if (pref[t.second] > 0 && p[t.first] != 100 && !d[t.second][t.second + 1]) {
      d[t.second][t.second + 1] = d[t.first][t.second] + 1;
      q.push({t.second, t.second + 1});
    }
  }
  cout << cnt;
}
