#include <bits/stdc++.h>
using namespace std;
int n, maxk;
int p[3001];
int toplam[3001];
bool yuz[3001];
int dp[3001][3001];
int adim[3001][3001];
void f(int x, int y, int k) {
  if (k > maxk) return;
  if (x > n) {
    dp[0][0] = 1;
    return;
  } else if (y > n) {
    dp[x][0] = 1;
    return;
  }
  if (dp[x][y] && adim[x][y] <= k) return;
  dp[x][y] = 1;
  adim[x][y] = k;
  if (p[x] != 0 && toplam[n] - toplam[y - 1] != 0) f(y + 1, y + 2, k + 1);
  if (yuz[y] == false && p[x] != 0) f(x, y + 1, k + 1);
  if (p[x] != 100 && toplam[n] - toplam[y - 1] != 0) f(y, y + 1, k + 1);
}
int main() {
  cin.sync_with_stdio(false);
  cin >> n >> maxk;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
    toplam[i] = p[i] + toplam[i - 1];
  }
  for (int i = n; i >= 1; i--) yuz[i] = (p[i] == 100) || yuz[i + 1];
  f(1, 2, 0);
  int c = 0;
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= n; j++) c += dp[i][j];
  cout << c << endl;
  return 0;
}
