#include <bits/stdc++.h>
using namespace std;
int vis[3010][3010];
int A[3010], canKill[3010], canNotKill[3010], n, k;
queue<pair<int, int> > q;
void insert(int i, int j, int t) {
  if (t > k) return;
  if (vis[i][j] == -1) {
    vis[i][j] = t;
    q.push(make_pair(i, j));
  }
}
void killi(int i, int j, int t) {
  if (canKill[j] && A[i] != 100) insert(j, j + 1, t);
}
void killj(int i, int j, int t) {
  if (A[i] && canNotKill[j]) insert(i, j + 1, t);
}
void killBoth(int i, int j, int t) {
  if (A[i] && canKill[j]) insert(j + 1, j + 2, t);
}
int bfs() {
  memset(vis, -1, sizeof vis);
  vis[0][1] = 0;
  int ans = 0;
  q.push(make_pair(0, 1));
  while (!q.empty()) {
    int i = q.front().first, j = q.front().second;
    q.pop();
    ans++;
    if (j >= n) continue;
    killBoth(i, j, vis[i][j] + 1);
    killi(i, j, vis[i][j] + 1);
    killj(i, j, vis[i][j] + 1);
  }
  return ans;
}
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 0; i < (n); i++) scanf("%d", A + i);
  for (int i = n - 1; i >= 0; i--) canKill[i] = max(canKill[i + 1], A[i]);
  canNotKill[n] = 1;
  for (int i = n - 1; i >= 0; i--)
    canNotKill[i] = (A[i] != 100) && canNotKill[i + 1];
  cout << bfs() << endl;
  return 0;
}
