#include <bits/stdc++.h>
using namespace std;
int n, k, p[3050], ans, mp[3050];
bool v[3050][3050];
void dfs(int x, int y, int f) {
  if (v[x][y]) return;
  v[x][y] = 1;
  ans++;
  if (f == k || y > n) return;
  if (mp[y] > 0 && p[x] > 0) dfs(y + 1, y + 2, f + 1);
  if (mp[y] < 100 && p[x] > 0) dfs(x, y + 1, f + 1);
  if (mp[y] > 0 && p[x] < 100) dfs(y, y + 1, f + 1);
}
int main() {
  ans = 0;
  memset((v), 0, sizeof(v));
  memset((mp), -1, sizeof(mp));
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
  }
  mp[n] = p[n];
  for (int i = n - 1; i >= 1; i--) {
    mp[i] = max(mp[i + 1], p[i]);
  }
  dfs(1, 2, 0);
  printf("%d\n", ans);
  return 0;
}
