#include <bits/stdc++.h>
using namespace std;
const int N = 3010;
int a[N], dp[N][N];
bool mark[N][N];
int main() {
  int n, k, maxx = 0, possible = 0;
  long long ans = 0;
  scanf("%d %d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] == 100) maxx = i;
    if (a[i] > 0) possible = i;
  }
  int pt = 1;
  mark[1][1] = 1;
  if (a[1] != 100 && possible > 1) {
    mark[2][2] = 1;
    dp[2][2] = 1;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j < i; j++) {
      if (mark[j][j] && dp[j][j] + i - j <= k && maxx <= j && a[j] != 0) {
        mark[i][j] = 1;
        dp[i][j] = dp[j][j] + i - j;
      }
    }
    for (int j = 1; j < i - 1; j++) {
      if (mark[i - 2][j] && a[j] && possible >= i - 1) {
        if (mark[i][i])
          dp[i][i] = min(dp[i][i], dp[i - 2][j] + 1);
        else {
          dp[i][i] = dp[i - 2][j] + 1;
          mark[i][i] = 1;
        }
      }
    }
    if (mark[i - 1][i - 1] && possible > i - 1 && a[i - 1] != 100) {
      if (mark[i][i])
        dp[i][i] = min(dp[i][i], dp[i - 1][i - 1] + 1);
      else {
        dp[i][i] = dp[i - 1][i - 1] + 1;
        mark[i][i] = 1;
      }
    }
  }
  for (int j = 1; j < n; j++) {
    if (mark[n - 1][j] && a[j] && possible >= n) {
      if (mark[n + 1][n + 1])
        dp[n + 1][n + 1] = min(dp[n + 1][n + 1], dp[n - 1][j] + 1);
      else {
        dp[n + 1][n + 1] = dp[n - 1][j] + 1;
        mark[n + 1][n + 1] = 1;
      }
    }
  }
  if (mark[n + 1][n + 1] && dp[n + 1][n + 1] <= k) ans++;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= i; j++) {
      if (mark[i][j] && dp[i][j] <= k) {
        ans++;
      }
    }
  }
  cout << ans;
}
