#include <bits/stdc++.h>
using namespace std;
const int N = 3010;
int f[N][N], p[N], maxp[N];
int n, k;
void dp(int x, int y) {
  if ((p[x] < 100) && (maxp[y] > 0))
    f[y][y + 1] = min(f[y][y + 1], f[x][y] + 1);
  if ((p[x] > 0) && (maxp[y] < 100))
    f[x][y + 1] = min(f[x][y + 1], f[x][y] + 1);
  if ((p[x] > 0) && (maxp[y] > 0))
    f[y + 1][y + 2] = min(f[y + 1][y + 2], f[x][y] + 1);
}
void deal() {
  for (int i = n; i >= 1; i--) maxp[i] = max(maxp[i + 1], p[i]);
}
void in() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &p[i]);
  deal();
  memset(f, 0x3f, sizeof(f));
  f[1][2] = 0;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) dp(i, j);
  int ans = 0;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n + 1; j++)
      if (f[i][j] <= k) ans++;
  if (f[n + 1][n + 2] <= k) ans++;
  cout << ans << endl;
}
int main() {
  in();
  return 0;
}
