#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);
inline bool in(int p, pair<int, int> r) {
  return p >= r.first && p <= r.second;
}
inline bool in(pair<int, int> r1, pair<int, int> r2) {
  return r1.first >= r2.first && r1.second <= r2.second;
}
inline int mid(pair<int, int> rg) { return (((rg.first) + (rg.second)) >> 1); }
pair<int, int> shift(bool d, pair<int, int> rg) {
  return d ? pair<int, int>(mid(rg) + 1, rg.second)
           : pair<int, int>(rg.first, mid(rg));
}
inline int lowbit(int x) { return x & (-x); }
inline int mgcd(int x, int y) { return y ? mgcd(y, x % y) : x; }
const int N = 3103;
int n, k, p[N];
int sum[N], tot[N], ans = 0;
bool f[N][N];
queue<pair<pair<int, int>, int> > Q;
void BFS() {
  Q.push(make_pair(make_pair(1, 2), 0));
  f[1][2] = 1;
  while (!Q.empty()) {
    ++ans;
    pair<pair<int, int>, int> ts = Q.front();
    pair<int, int> to = ts.first;
    Q.pop();
    if (to.second > n) continue;
    if (ts.second >= k) continue;
    if (sum[n] - sum[to.second - 1]) {
      if (p[to.first])
        if (!f[to.second + 1][to.second + 2]) {
          Q.push(make_pair(make_pair(to.second + 1, to.second + 2),
                           ts.second + 1));
          f[to.second + 1][to.second + 2] = 1;
        }
      if (p[to.first] != 100)
        if (!f[to.second][to.second + 1]) {
          Q.push(make_pair(make_pair(to.second, to.second + 1), ts.second + 1));
          f[to.second][to.second + 1] = 1;
        }
    }
    if (tot[n] - tot[to.second - 1]) continue;
    if (p[to.first])
      if (!f[to.first][to.second + 1]) {
        Q.push(make_pair(make_pair(to.first, to.second + 1), ts.second + 1));
        f[to.first][to.second + 1] = 1;
      }
  }
}
int main() {
  scanf("%d%d", &n, &k);
  if (n == 1) {
    printf("1\n");
    return 0;
  }
  for (int i = 0; i < (int)(n); i++) {
    scanf("%d", &p[i + 1]);
    sum[i + 1] = sum[i] + p[i + 1];
    tot[i + 1] = tot[i] + (p[i + 1] == 100);
  }
  BFS();
  printf("%d\n", ans);
  return 0;
}
