#include <bits/stdc++.h>
using namespace std;
int f[3333], p[3333];
int n, k, ans;
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; ++i) scanf("%d", &p[i]);
  f[1] = 0;
  ans = 1;
  for (int i = 2; i <= n; ++i) {
    int g;
    f[i] = g = 10000;
    for (int j = i; j <= n; ++j)
      if (p[j] > 0) {
        g = (f[i - 1] + 1);
        break;
      }
    if (g <= 10000 && p[i - 1] < 100) f[i] = g;
    if (i - 2 >= 0) {
      if (p[i - 2] > 0) f[i] = min(f[i], f[i - 2] + 1);
    }
    ans += (f[i] <= k);
  }
  if (f[n - 1] + 1 <= k && p[n - 1] > 0 && p[n] > 0) ans++;
  for (int i = 1; i < n; ++i) {
    int ff = 1;
    for (int j = i + 1; j <= n; ++j)
      if (p[j] == 100) {
        ff = 0;
        break;
      }
    if (p[i] == 0 || !ff) continue;
    for (int j = i + 2; j - i - 1 + f[i] <= k && j <= n + 1; ++j) {
      ans++;
    }
  }
  cout << ans << endl;
}
