#include <bits/stdc++.h>
using namespace std;
int N, K, p[3010], dp[3010][3010], m[3010], out = 0;
void input() {
  scanf("%d%d", &N, &K);
  for (int i = 1; i <= N; ++i) {
    scanf("%d", p + i);
  }
  for (int i = N; i >= 1; --i) {
    m[i] = max(m[i + 1], p[i]);
  }
}
void evaluate(int p1, int p2, int k) {
  if (dp[p1][p2]) return;
  dp[p1][p2] = 1;
  out++;
  if (p2 > N || k <= 0) return;
  if (p[p1] != 0 && m[p2] != 0) evaluate(p2 + 1, p2 + 2, k - 1);
  if (p[p1] != 0 && m[p2] != 100) evaluate(p1, p2 + 1, k - 1);
  if (p[p1] != 100 && m[p2] != 0) evaluate(p2, p2 + 1, k - 1);
}
int main() {
  input();
  evaluate(1, 2, K);
  printf("%d\n", out);
  return 0;
}
