#include <bits/stdc++.h>
using namespace std;
const int N = 3005;
int n, a[N], k, ans, sum[N], r;
int dp[N][N];
void update(int &x, int val) { x = min(x, val); }
int main() {
  scanf("%d%d", &n, &k);
  r = -1;
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
    if (a[i] == 100) r = i;
    sum[i] = sum[i - 1] + a[i];
  }
  memset(dp, 0x3f, sizeof(dp));
  dp[1][2] = 0;
  for (int x = 1; x <= n; x++)
    for (int y = x + 1; y <= n; y++) {
      if (dp[x][y] >= k) continue;
      int nxt = dp[x][y] + 1;
      for (int i = 0; i < 2; i++)
        for (int j = 0; j < 2; j++) {
          if (r > x && i) continue;
          if (a[x] == 100 && j) continue;
          if (sum[n] - sum[y - 1] == 0 && !i) continue;
          if (a[x] == 0 && !j) continue;
          if (i && !j) update(dp[x][y + 1], nxt);
          if (!i && j) update(dp[y][y + 1], nxt);
          if (!i && !j) {
            if (y == n)
              update(dp[0][0], nxt);
            else
              update(dp[y + 1][y + 2], nxt);
          }
        }
    }
  ans = 0;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n + 1; j++)
      if (dp[i][j] <= k) {
        ans++;
      }
  if (dp[0][0] <= k) ans++;
  printf("%d\n", ans);
  return 0;
}
