#include <bits/stdc++.h>
using namespace std;
int p[3005], must[3005];
int n, k, ans;
bool vis[3005][3005];
void dfs(int l, int r, int step) {
  ans++;
  vis[l][r] = 1;
  if (step == k || r > n) return;
  if (must[r] && p[l] && !vis[r + 1][r + 2]) dfs(r + 1, r + 2, step + 1);
  if (must[r] && p[l] != 100 && !vis[r][r + 1]) dfs(r, r + 1, step + 1);
  if (must[r] != 100 && p[l] && !vis[l][r + 1]) dfs(l, r + 1, step + 1);
}
int main() {
  int i;
  scanf("%d%d", &n, &k);
  for (i = 1; i <= n; ++i) scanf("%d", p + i);
  must[n + 1] = 0;
  for (i = n; i >= 1; --i) must[i] = max(must[i + 1], p[i]);
  ans = 0;
  memset(vis, 0, sizeof(vis));
  dfs(1, 2, 0);
  printf("%d\n", ans);
  return 0;
}
