#include <bits/stdc++.h>
using namespace std;
long long a[200005];
long long n, K;
bool Check(long long x) {
  double sum = 0;
  long long p = x - 1;
  for (int i = 0; i < n; i++) {
    if (a[n - i] == 0) continue;
    long long t = p;
    long long q = p + i;
    if (q - t < t) t = q - t;
    double tmp = (double)a[n - i];
    for (long long k = 0, a = t, b = q; k < t; k++, a--, b--) {
      tmp = tmp * (1.0) * b / a;
      if (tmp >= K) return true;
    }
    sum += tmp;
    if (sum >= K) return true;
  }
  return false;
}
int main() {
  scanf("%d", &n);
  cin >> K;
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &a[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] >= K) {
      printf("0\n");
      return 0;
    }
  }
  long long L = 1, R = K + 1;
  long long ans = 0;
  while (L <= R) {
    long long m = (L + R) >> 1;
    if (Check(m)) {
      ans = m;
      R = m - 1;
    } else {
      L = m + 1;
    }
  }
  cout << ans << endl;
  return 0;
}
