#include <bits/stdc++.h>
using namespace std;
using INT = long long;
INT a[200100], b[200100];
int main() {
  INT sum = 0;
  int n;
  INT k;
  cin >> n >> k;
  int nn = 0;
  INT mx = 0;
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    mx = max(mx, (INT)x);
    if (mx) a[++nn] = x;
  }
  if (mx >= k) {
    puts("0");
    return 0;
  }
  if (nn > 3) {
    INT ct = 0;
    while (mx < k) {
      for (int i = 1; i <= nn; i++) b[i] = b[i - 1] + a[i];
      for (int i = 1; i <= nn; i++) {
        a[i] = b[i];
        mx = max(mx, a[i]);
      }
      ct++;
    }
    cout << ct << endl;
  }
  if (nn == 3) {
    INT st = 0, ed = 2000000000;
    while (st + 1 < ed) {
      INT md = (st + ed) >> 1;
      INT A = md * (md + 1) / 2, B = md;
      if (a[1] >= (k + A - 1) / A) {
        ed = md;
        continue;
      }
      INT tmp = A * a[1] + B * a[2] + a[3];
      if (tmp >= k)
        ed = md;
      else
        st = md;
    }
    cout << ed << endl;
    return 0;
  }
  if (nn == 2) {
    INT ans = (k - a[2] + a[1] - 1) / a[1];
    cout << ans << endl;
  }
  return 0;
}
