#include <bits/stdc++.h>
using namespace std;
int n, k;
int ans;
int p[5000];
bool vis[5000][5000];
int c[5000];
void dfs(int num1, int num2, int cnt) {
  if (vis[num1][num2]) return;
  vis[num1][num2] = true;
  ans++;
  if (num2 > n || cnt == k) return;
  if (p[num1]) {
    if (c[num2]) dfs(num2 + 1, num2 + 2, cnt + 1);
    if (c[num2] < 100) dfs(num1, num2 + 1, cnt + 1);
  }
  if (p[num1] != 100) {
    if (c[num2]) dfs(num2, num2 + 1, cnt + 1);
  }
}
int main() {
  while (scanf("%d%d", &n, &k) != EOF) {
    ans = 0;
    memset(vis, false, sizeof(vis));
    memset(p, 0, sizeof(p));
    memset(c, 0, sizeof(c));
    for (int i = 1; i <= n; i++) {
      scanf("%d", &p[i]);
    }
    for (int i = n; i >= 1; i--) {
      c[i] = max(c[i + 1], p[i]);
    }
    dfs(1, 2, 0);
    printf("%d\n", ans);
  }
  return 0;
}
