#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void smin(T &a, U b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, U b) {
  if (a < b) a = b;
}
template <class T>
inline void gn(T &first) {
  char c, sg = 0;
  while (c = getchar(), (c > '9' || c < '0') && c != '-')
    ;
  for ((c == '-' ? sg = 1, c = getchar() : 0), first = 0; c >= '0' && c <= '9';
       c = getchar())
    first = (first << 1) + (first << 3) + c - '0';
  if (sg) first = -first;
}
template <class T, class T1>
inline void gn(T &first, T1 &second) {
  gn(first);
  gn(second);
}
template <class T, class T1, class T2>
inline void gn(T &first, T1 &second, T2 &z) {
  gn(first);
  gn(second);
  gn(z);
}
template <class T>
inline void print(T first) {
  if (first < 0) {
    putchar('-');
    return print(-first);
  }
  if (first < 10) {
    putchar('0' + first);
    return;
  }
  print(first / 10);
  putchar(first % 10 + '0');
}
template <class T>
inline void printsp(T first) {
  print(first);
  putchar(' ');
}
template <class T>
inline void println(T first) {
  print(first);
  putchar('\n');
}
int power(int a, int b, int m, int ans = 1) {
  for (; b; b >>= 1, a = 1LL * a * a % m)
    if (b & 1) ans = 1LL * ans * a % m;
  return ans;
}
int p[3030];
int vst[3030][3030];
int vst1[3030], vst2[3030];
int q[3030 * 3030 * 3], qf, qb;
void Push(int u, int v, int d) { q[qb++] = u, q[qb++] = v, q[qb++] = d; }
int main() {
  int n, k, ans = 0;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) scanf("%d", p + i);
  for (int i = n; i > 0; i--) {
    vst1[i] = vst1[i + 1];
    vst2[i] = vst2[i + 1];
    if (p[i] == 100) vst1[i] = 1;
    if (p[i]) vst2[i] = 1;
  }
  q[qb++] = 1, q[qb++] = 2, q[qb++] = 0;
  vst[1][2] = 1;
  int st, ed;
  while (qf < qb) {
    int u = q[qf++], v = q[qf++], d = q[qf++];
    ans++;
    if (d == k) continue;
    st = v + 1, ed = v + 2;
    smin(st, n + 1), smin(ed, n + 1);
    if (!vst[st][ed] && p[u] && vst2[v]) {
      vst[st][ed] = 1;
      Push(st, ed, d + 1);
    }
    st = u;
    ed = min(v + 1, n + 1);
    if (!vst[st][ed] && !vst1[v] && p[u]) {
      vst[st][ed] = 1;
      Push(st, ed, d + 1);
    }
    st = v;
    ed = min(v + 1, n + 1);
    if (!vst[st][ed] && p[u] != 100 && vst2[v]) {
      vst[st][ed] = 1;
      Push(st, ed, d + 1);
    }
  }
  cout << ans << endl;
  return 0;
}
