#include <bits/stdc++.h>
using namespace std;
const int N = 3010;
int p[N];
int mx[N];
int n, k;
int dp[N][N];
int ans;
int main() {
  int i, j;
  scanf("%d%d", &(n), &(k));
  for ((i) = 0; (i) < (int)(n); (i)++) scanf("%d", &(p[i]));
  mx[n - 1] = p[n - 1];
  for ((i) = (int)(n - 2); (i) >= (int)(0); (i)--) mx[i] = max(mx[i + 1], p[i]);
  if (n == 1) return puts("1"), 0;
  for ((i) = 0; (i) < (int)(n + 2); (i)++)
    for ((j) = 0; (j) < (int)(n + 2); (j)++) dp[i][j] = 99999;
  dp[0][1] = 0;
  for ((i) = 0; (i) < (int)(n); (i)++)
    for ((j) = (int)(i + 1); (j) <= (int)(n - 1); (j)++)
      if (dp[i][j] < k) {
        if (p[i] != 100 && mx[j])
          dp[j][j + 1] = min(dp[j][j + 1], dp[i][j] + 1);
        if (p[i] && mx[j] != 100)
          dp[i][j + 1] = min(dp[i][j + 1], dp[i][j] + 1);
        if (p[i] && mx[j])
          dp[j + 1][j + 2] = min(dp[j + 1][j + 2], dp[i][j] + 1);
      }
  for ((i) = 0; (i) < (int)(n); (i)++)
    for ((j) = (int)(i + 1); (j) <= (int)(n); (j)++)
      if (dp[i][j] <= k) ans++;
  if (dp[n][n + 1] <= k) ans++;
  printf("%d\n", ans);
  return 0;
}
