#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
long long k, n;
long long a[N];
bool check(long long spl) {
  long long i, j, t, x, y, p, q;
  double sum = 0, tmp;
  for (t = 0; t < n; t++) {
    if (a[t] == 0) continue;
    x = spl;
    y = (n - 1) - t;
    p = x - 1;
    q = x + y - 1;
    p = min(q - p, p);
    tmp = a[t];
    for (i = q, j = p; j >= 1; j--, i--) {
      tmp = tmp * i / j;
      if (tmp >= k) return true;
    }
    sum += tmp;
    if (sum >= k) return true;
  }
  return false;
}
long long BinaryFind(long long l, long long r) {
  long long mid;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (check(mid))
      r = mid - 1;
    else
      l = mid + 1;
  }
  return l;
}
int main() {
  scanf("%lld%lld", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
    if (a[i] >= k) {
      puts("0");
      return 0;
    }
  }
  printf("%lld\n", BinaryFind(1, k));
}
