#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> p(n);
  for (auto &pi : p) cin >> pi;
  vector<int> acc(n + 1);
  for (int i = n - 1; i >= 0; i--) acc[i] = max(acc[i + 1], p[i]);
  vector<vector<bool>> seen(n + 1, vector<bool>(n + 2));
  int ans = 0;
  vector<pair<int, int>> cur;
  ans += seen[0][1] = true;
  cur.emplace_back(0, 1);
  while (k--) {
    vector<pair<int, int>> nxt;
    auto enqueue = [&](int i, int j) {
      if (seen[i][j]) return;
      ans += seen[i][j] = true;
      nxt.emplace_back(i, j);
    };
    for (auto &e : cur) {
      int i = e.first, j = e.second;
      if (i >= n - 1 || j >= n) continue;
      if (p[i] && acc[j]) enqueue(j + 1, j + 2);
      if (p[i] != 100 && acc[j]) enqueue(j, j + 1);
      if (p[i] && acc[j] != 100) enqueue(i, j + 1);
    }
    cur = nxt;
  }
  cout << ans << endl;
  return 0;
}
