#include <bits/stdc++.h>
using namespace std;
const int maxn = 3000 + 10;
int dis[maxn][maxn];
bool mark[maxn][maxn];
int a[maxn];
bool allzer[maxn], hasone[maxn];
queue<pair<int, int> > q;
int n, k, ans;
vector<pair<int, int> > make_adj(pair<int, int> v) {
  vector<pair<int, int> > ret;
  if (v.first >= n - 1 or v.second >= n) return ret;
  if (a[v.first]) {
    if (!hasone[v.second]) ret.push_back({v.first, v.second + 1});
    if (!allzer[v.second]) ret.push_back({v.second + 1, v.second + 2});
  }
  if (a[v.first] != 100 and !allzer[v.second])
    ret.push_back(make_pair(v.second, v.second + 1));
  return ret;
}
void bfs(void) {
  memset(dis, 63, sizeof dis);
  dis[0][1] = 0;
  q.push(make_pair(0, 1));
  while (((int)(q).size())) {
    auto v = q.front();
    q.pop();
    if (dis[v.first][v.second] > k) break;
    ans++;
    pair<int, int> adj[3];
    int sz = 0;
    if (v.first < n - 1 and v.second < n) {
      if (a[v.first]) {
        if (!hasone[v.second]) adj[sz++] = {v.first, v.second + 1};
        if (!allzer[v.second]) adj[sz++] = {v.second + 1, v.second + 2};
      }
      if (a[v.first] != 100 and !allzer[v.second])
        adj[sz++] = (make_pair(v.second, v.second + 1));
    }
    for (int i = 0; i < sz; i++) {
      pair<int, int> u = adj[i];
      if (!mark[u.first][u.second]) {
        mark[u.first][u.second] = true;
        dis[u.first][u.second] = dis[v.first][v.second] + 1;
        q.push(u);
      }
    }
  }
  return;
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  allzer[n] = true;
  for (int i = n - 1; i >= 0; i--) {
    allzer[i] = allzer[i + 1] and (a[i] == 0);
    hasone[i] = hasone[i + 1] or (a[i] == 100);
  }
  bfs();
  printf("%d", ans);
  return 0;
}
