#include <bits/stdc++.h>
using namespace std;
const int M = 2e5 + 5;
long long a[M];
long long b[M];
int32_t main() {
  int n;
  long long k;
  cin >> n >> k;
  long long MAX = 0;
  int fir = -1;
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
    if (fir == -1 && a[i] > 0) fir = i;
    ((MAX) = max((MAX), (a[i])));
  }
  if (MAX >= k) return cout << 0 << endl, 0;
  if (fir == n - 2)
    return cout << (k - a[n - 1] + a[n - 2] - 1) / a[n - 2] << endl, 0;
  if (fir < n - 3) {
    int m = n - fir;
    for (int i = 0; i < m; i++) b[i] = a[i + fir];
    int cnt = 1;
    while (1) {
      for (int i = 1; i < m; i++) {
        b[i] = b[i] + b[i - 1];
        if (b[i] >= k) return cout << cnt << endl, 0;
      }
      cnt++;
    }
  }
  long long lo = 0, hi = 1e9 + 5e8;
  ((hi) = min((hi), ((long long)((k - a[n - 2]) / a[n - 3]))));
  if (a[n - 2]) ((hi) = min((hi), ((long long)((k - a[n - 1]) / a[n - 2]))));
  ((hi) = min((hi), ((long long)sqrt((2ll * k) / a[n - 3]))));
  hi += 10;
  while (hi - lo > 1) {
    long long mid = (hi + lo) / 2ll;
    long long f3 =
        a[n - 1] + mid * a[n - 2] + (mid * (mid + 1) / 2ll) * a[n - 3];
    long long f2 = a[n - 2] + mid * a[n - 3];
    if (max(f2, f3) >= k)
      hi = mid;
    else
      lo = mid;
  }
  return cout << hi << endl, 0;
}
