#include <bits/stdc++.h>
using namespace std;
const int MAX = 3005;
const long long MOD = 1e9 + 7;
queue<pair<int, int> > q;
int dis[MAX][MAX], p[MAX];
bool f[MAX][2];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  memset(dis, -1, sizeof(dis));
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> p[i];
  if (n == 1) return cout << "1\n", 0;
  for (int i = n; i >= 1; i--) {
    if (p[i] != 0)
      f[i][0] = true;
    else
      f[i][0] = f[i + 1][0];
    if (p[i] == 100)
      f[i][1] = true;
    else
      f[i][1] = f[i + 1][1];
  }
  q.push({1, 2});
  dis[1][2] = 0;
  while (!q.empty()) {
    int m1 = q.front().first, m2 = q.front().second;
    int d = dis[m1][m2];
    q.pop();
    if (m2 > n) continue;
    bool f1 = f[m2][1], f2 = f[m2][0];
    if (f2) {
      if (p[m1] == 0) {
        if (dis[m2][m2 + 1] == -1) {
          q.push({m2, m2 + 1});
          dis[m2][m2 + 1] = d + 1;
        }
      } else if (p[m1] == 100) {
        if (dis[m2 + 1][m2 + 2] == -1) {
          q.push({m2 + 1, m2 + 2});
          dis[m2 + 1][m2 + 2] = d + 1;
        }
      } else {
        if (dis[m2][m2 + 1] == -1) {
          q.push({m2, m2 + 1});
          dis[m2][m2 + 1] = d + 1;
        }
        if (dis[m2 + 1][m2 + 2] == -1) {
          q.push({m2 + 1, m2 + 2});
          dis[m2 + 1][m2 + 2] = d + 1;
        }
      }
    }
    if (!f1) {
      if (p[m1] != 0) {
        if (dis[m1][m2 + 1] == -1) {
          q.push({m1, m2 + 1});
          dis[m1][m2 + 1] = d + 1;
        }
      }
    }
  }
  int res = 0;
  for (int i = 1; i <= n + 1; i++)
    for (int t = 1; t <= n + 1; t++)
      if (dis[i][t] != -1 && dis[i][t] <= k) res++;
  if (dis[n + 1][n + 2] != -1 && dis[n + 1][n + 2] <= k) res++;
  cout << res << "\n";
}
