#include <bits/stdc++.h>
const int N = 200000;
int n;
long long arr[N], k;
int main() {
  scanf("%d%lld", &n, &k);
  long long *a = arr;
  for (int i = 0; i < n; ++i) scanf("%lld", a + i);
  while (!*a) {
    --n;
    ++a;
  }
  if (n <= 3) {
    long long l = 0, r = k, ans;
    while (l <= r) {
      long long m = (l + r) >> 1;
      bool ok;
      if (n == 2)
        ok = m >= (LLONG_MAX / 2) / a[0] || m * a[0] + a[1] >= k;
      else
        ok = m >= 2e9 || (m * (m + 1) / 2) >= (LLONG_MAX / 2) / a[0] ||
             m * (m + 1) / 2 * a[0] + a[1] * m + a[2] >= k;
      if (ok) {
        ans = m;
        r = m - 1;
      } else
        l = m + 1;
    }
    printf("%lld\n", ans);
    return 0;
  }
  bool more = *std::max_element(a, a + n) >= k;
  if (more)
    printf("0\n");
  else {
    int i = 1;
    while (true) {
      for (int j = 1; j < n && !more; ++j) {
        a[j] += a[j - 1];
        if (a[j] >= k) more = true;
      }
      if (more) break;
      ++i;
    }
    printf("%d\n", i);
  }
  return 0;
}
