#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 5;
long long n, k;
long long sum;
long long arr[maxn];
bool check(long long cur) {
  long long x, y, p, q;
  double sum = 0;
  double tmp;
  for (long long t = 0; t < n; t++) {
    if (arr[t] == 0) continue;
    x = cur;
    y = (n - 1) - t;
    p = x - 1;
    q = x + y - 1;
    p = min(p, q - p);
    tmp = arr[t];
    long long i, j;
    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;
}
void solve() {
  long long ls = 1, rs = k, mid;
  while (ls < rs) {
    mid = (ls + rs) >> 1;
    if (check(mid))
      rs = mid;
    else
      ls = mid + 1;
  }
  cout << ls << endl;
  return;
}
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    scanf("%I64d", &arr[i]);
    if (arr[i] >= k) {
      printf("0\n");
      return 0;
    }
  }
  solve();
  return 0;
}
