#include <bits/stdc++.h>
using namespace std;
const int maxN = 3000;
queue<pair<int, int> > Q;
pair<bool, int> possible[maxN + 2][maxN + 3];
int p[maxN + 1];
bool any100[maxN + 1], anypositive[maxN + 1];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", p + i);
  any100[n] = p[n] == 100;
  anypositive[n] = p[n] > 0;
  for (int i = n - 1; i > 0; i--) {
    any100[i] = any100[i + 1] or p[i] == 100;
    anypositive[i] = anypositive[i + 1] or p[i] > 0;
  }
  possible[1][2] = make_pair(1, 0);
  Q.push(make_pair(1, 2));
  int res = 1;
  while (!Q.empty()) {
    int fst = Q.front().first, snd = Q.front().second,
        steps = possible[fst][snd].second;
    Q.pop();
    if (snd > n or steps == k) continue;
    if (p[fst] != 100 and anypositive[snd] and !possible[snd][snd + 1].first) {
      possible[snd][snd + 1] = make_pair(true, steps + 1);
      Q.push(make_pair(snd, snd + 1));
      res++;
    }
    if (p[fst] != 0 and !any100[snd] and !possible[fst][snd + 1].first) {
      possible[fst][snd + 1] = make_pair(true, steps + 1);
      Q.push(make_pair(fst, snd + 1));
      res++;
    }
    if (p[fst] != 0 and anypositive[snd] and
        !possible[snd + 1][snd + 2].first) {
      possible[snd + 1][snd + 2] = make_pair(true, steps + 1);
      Q.push(make_pair(snd + 1, snd + 2));
      res++;
    }
  }
  printf("%d\n", res);
  return 0;
}
