#include <bits/stdc++.h>
using namespace std;
const int N = 3005;
int dp[N][N] = {0}, n, k, p[N], a[N], b[N];
queue<pair<int, int> > q[N];
int main() {
  scanf("%d %d", &n, &k);
  if (n == 1) {
    puts("1");
    return 0;
  }
  a[n + 1] = b[n + 1] = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &p[i]);
    a[i] = a[i + 1] + (p[i] != 0);
    b[i] = b[i + 1] + (p[i] == 100);
  }
  for (int i = n; i >= 1; i--) {
    a[i] = a[i + 1] + (p[i] != 0);
    b[i] = b[i + 1] + (p[i] == 100);
  }
  int ans = 1;
  q[0].push(make_pair(1, 2));
  for (int i = 0; i < k; i++) {
    while (!q[i].empty()) {
      pair<int, int> u = q[i].front();
      q[i].pop();
      if (u.second > n) continue;
      if (p[u.first] == 100) {
        if (b[u.second]) {
          int x = u.second + 1, y = min(u.second + 2, n + 1);
          if (dp[x][y] == 0) {
            ans++;
            dp[x][y] = 1;
            q[i + 1].push(make_pair(x, y));
          }
        } else if (a[u.second] == 0) {
          int x = u.first, y = u.second + 1;
          if (dp[x][y] == 0) {
            ans++;
            dp[x][y] = 1;
            q[i + 1].push(make_pair(x, y));
          }
        } else {
          int x = u.second + 1, y = min(u.second + 2, n + 1);
          if (dp[x][y] == 0) {
            ans++;
            dp[x][y] = 1;
            q[i + 1].push(make_pair(x, y));
          }
          x = u.first;
          y = u.second + 1;
          if (dp[x][y] == 0) {
            ans++;
            dp[x][y] = 1;
            q[i + 1].push(make_pair(x, y));
          }
        }
      } else if (p[u.first] == 0) {
        if (b[u.second]) {
          int x = u.second, y = u.second + 1;
          if (dp[x][y] == 0) {
            ans++;
            dp[x][y] = 1;
            q[i + 1].push(make_pair(x, y));
          }
        } else if (a[u.second] == 0) {
          ;
        } else {
          int x = u.second, y = u.second + 1;
          if (dp[x][y] == 0) {
            ans++;
            dp[x][y] = 1;
            q[i + 1].push(make_pair(x, y));
          }
        }
      } else {
        if (b[u.second]) {
          int x = u.second, y = u.second + 1;
          if (dp[x][y] == 0) {
            ans++;
            dp[x][y] = 1;
            q[i + 1].push(make_pair(x, y));
          }
          x = u.second + 1;
          y = min(u.second + 2, n + 1);
          if (dp[x][y] == 0) {
            ans++;
            dp[x][y] = 1;
            q[i + 1].push(make_pair(x, y));
          }
        } else if (a[u.second] == 0) {
          int x = u.first, y = u.second + 1;
          if (dp[x][y] == 0) {
            ans++;
            dp[x][y] = 1;
            q[i + 1].push(make_pair(x, y));
          }
        } else {
          int x = u.first, y = u.second + 1;
          if (dp[x][y] == 0) {
            ans++;
            dp[x][y] = 1;
            q[i + 1].push(make_pair(x, y));
          }
          x = u.second + 1;
          y = min(u.second + 2, n + 1);
          if (dp[x][y] == 0) {
            ans++;
            dp[x][y] = 1;
            q[i + 1].push(make_pair(x, y));
          }
          x = u.second;
          y = u.second + 1;
          if (dp[x][y] == 0) {
            ans++;
            dp[x][y] = 1;
            q[i + 1].push(make_pair(x, y));
          }
        }
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
