#include <bits/stdc++.h>
using namespace std;
const long long int N = 3e3 + 10, N2 = 1e5, delta = 10501, mod = 998244353,
                    oo = 1e9 + 10, LOG = 20, SQ = 300;
const long double PI = 3.141592653589793;
long long int p[N], h[N][N];
bool is1[N], is2[N];
int32_t main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long int n, k, ans = 0;
  cin >> n >> k;
  for (long long int i = 0; i < n; i++) cin >> p[i];
  if (n == 1) return cout << 1 << '\n', 0;
  is1[n] = 1;
  for (long long int i = n - 1; ~i; i--)
    is1[i] = is1[i + 1] & (p[i] != 100), is2[i] = is2[i + 1] | (p[i] > 0);
  queue<pair<long long int, long long int> > q;
  long long int x = 0, y = 1;
  q.push({x, y});
  while (q.size()) {
    pair<long long int, long long int> u = q.front();
    x = u.first, y = u.second;
    q.pop();
    ans++;
    if (max(x, y) >= n || h[x][y] >= k) continue;
    if (p[x] > 0 && is1[y] && !h[x][y + 1]) {
      q.push({x, y + 1});
      h[x][y + 1] = h[x][y] + 1;
    }
    if (p[x] != 100 && is2[y] && !h[y][y + 1]) {
      q.push({y, y + 1});
      h[y][y + 1] = h[x][y] + 1;
    }
    if (p[x] > 0 && is2[y] && !h[y + 1][y + 2]) {
      q.push({y + 1, y + 2});
      h[y + 1][y + 2] = h[x][y] + 1;
    }
  }
  cout << ans << '\n';
  return 0;
}
