#include <bits/stdc++.h>
using namespace std;
int S[3003][3003];
int isOne[3003];
int P[3003];
int N, K, cnt = 0;
void gogo(int a, int b, int k) {
  if (S[a][b]) return;
  S[a][b] = true;
  cnt++;
  if (!k || b > N) return;
  if (isOne[b] != 0 && P[a] != 0) gogo(b + 1, b + 2, k - 1);
  if (isOne[b] != 0 && P[a] != 100) gogo(b, b + 1, k - 1);
  if (isOne[b] != 100 && P[a] != 0) gogo(a, b + 1, k - 1);
}
int main() {
  cin >> N >> K;
  for (int i = 1; i <= N; i++) cin >> P[i];
  isOne[N] = P[N];
  for (int i = N - 1; i >= 1; i--) {
    isOne[i] = max(isOne[i + 1], P[i]);
  }
  gogo(1, 2, K);
  cout << cnt << endl;
  return 0;
}
