#include <bits/stdc++.h>
using namespace std;
bool pd[3002][3002];
int z[3001];
int m[3000], p[3000];
int n, k;
struct trip {
  int f, s, t;
  trip(int a, int b, int c) {
    f = a;
    s = b;
    t = c;
  }
};
void solve(void) {
  queue<trip> q;
  q.push(trip(0, 1, 0));
  pd[0][1] = true;
  while (!q.empty()) {
    trip curr = q.front();
    q.pop();
    curr.f = min(n, curr.f);
    curr.s = min(n, curr.s);
    if (curr.f == n || curr.s == n) {
      pd[curr.f][curr.s] = true;
      continue;
    }
    if (m[curr.s] == 0 && p[curr.f] == 0)
      ;
    else if (m[curr.s] == 0) {
      if (!pd[curr.f][curr.s + 1] && curr.t < k) {
        pd[curr.f][curr.s + 1] = true;
        q.push(trip(curr.f, curr.s + 1, curr.t + 1));
      }
    } else if (p[curr.f] == 0) {
      if (!pd[curr.s][curr.s + 1] && curr.t < k) {
        pd[curr.s][curr.s + 1] = true;
        q.push(trip(curr.s, curr.s + 1, curr.t + 1));
      }
    } else if (m[curr.s] == 100 && p[curr.f] == 100) {
      if (!pd[curr.s + 1][curr.s + 2] && curr.t < k) {
        pd[curr.s + 1][curr.s + 2] = true;
        q.push(trip(curr.s + 1, curr.s + 2, curr.t + 1));
      }
    } else if (m[curr.s] == 100) {
      if (!pd[curr.s][curr.s + 1] && curr.t < k) {
        pd[curr.s][curr.s + 1] = true;
        q.push(trip(curr.s, curr.s + 1, curr.t + 1));
      }
      if (!pd[curr.s + 1][curr.s + 2] && curr.t < k) {
        pd[curr.s + 1][curr.s + 2] = true;
        q.push(trip(curr.s + 1, curr.s + 2, curr.t + 1));
      }
    } else if (p[curr.f] == 100) {
      if (!pd[curr.f][curr.s + 1] && curr.t < k) {
        pd[curr.f][curr.s + 1] = true;
        q.push(trip(curr.f, curr.s + 1, curr.t + 1));
      }
      if (!pd[curr.s + 1][curr.s + 2] && curr.t < k) {
        pd[curr.s + 1][curr.s + 2] = true;
        q.push(trip(curr.s + 1, curr.s + 2, curr.t + 1));
      }
    } else {
      if (!pd[curr.s][curr.s + 1] && curr.t < k) {
        pd[curr.s][curr.s + 1] = true;
        q.push(trip(curr.s, curr.s + 1, curr.t + 1));
      }
      if (!pd[curr.f][curr.s + 1] && curr.t < k) {
        pd[curr.f][curr.s + 1] = true;
        q.push(trip(curr.f, curr.s + 1, curr.t + 1));
      }
      if (!pd[curr.s + 1][curr.s + 2] && curr.t < k) {
        pd[curr.s + 1][curr.s + 2] = true;
        q.push(trip(curr.s + 1, curr.s + 2, curr.t + 1));
      }
    }
  }
}
int main(void) {
  int i, j;
  z[0] = 0;
  scanf("%d%d", &n, &k);
  for (i = 0; i < n; i++) {
    scanf("%d", &p[i]);
    z[i + 1] = z[i] + (p[i] ? 0 : 1);
  }
  m[n - 1] = p[n - 1];
  for (i = n - 2; i >= 0; i--) m[i] = max(m[i + 1], p[i]);
  memset(pd, 0, sizeof pd);
  solve();
  int ans = 0;
  for (i = 0; i <= n; i++) {
    for (j = 0; j <= n; j++) {
      ans += pd[i][j];
    }
  }
  printf("%d\n", ans);
  return 0;
}
