#include <bits/stdc++.h>
using namespace std;
int p[3003], a[3003], n, k, mx[3003], vis[3003][3003], counter = 0;
void bfs() {
  queue<pair<pair<int, int>, int> > q;
  q.push(make_pair(make_pair(0, 1), k));
  int bul, x, y;
  memset(vis, 0, sizeof(vis));
  while (!q.empty()) {
    x = q.front().first.first;
    y = q.front().first.second;
    bul = q.front().second;
    q.pop();
    if (bul < 0) continue;
    --bul;
    if (vis[x][y]) continue;
    vis[x][y] = 1;
    ++counter;
    if (y >= n) continue;
    if (p[x] > 0 && mx[y] > 0) q.push(make_pair(make_pair(y + 1, y + 2), bul));
    if (p[x] > 0 && mx[y] < 100) q.push(make_pair(make_pair(x, y + 1), bul));
    if (p[x] < 100 && mx[y] > 0) q.push(make_pair(make_pair(y, y + 1), bul));
  }
}
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    scanf("%d", p + i);
    a[i] = i;
  }
  mx[n - 1] = p[n - 1];
  for (int i = n - 2; i >= 0; --i) mx[i] = max(p[i], mx[i + 1]);
  bfs();
  cout << counter;
}
