#include <bits/stdc++.h>
using namespace std;
int n, p[3005];
int tmp[3005];
long long ans;
int dp[3005][3005];
void go(int a, int b, int k) {
  if (dp[a][b]) return;
  dp[a][b] = 1;
  ans++;
  if (b >= n || k == 0) return;
  if (p[a] && tmp[b]) go(b + 1, b + 2, k - 1);
  if (p[a] && tmp[b] != 100) go(a, b + 1, k - 1);
  if (p[a] != 100 && tmp[b]) go(b, b + 1, k - 1);
}
int main() {
  int k;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) scanf("%d", &p[i]);
  tmp[n - 1] = p[n - 1];
  for (int i = n - 2; i >= 0; i--) tmp[i] = max(tmp[i + 1], p[i]);
  go(0, 1, k);
  printf("%I64d\n", ans);
  return 0;
}
