#include <bits/stdc++.h>
using namespace std;
int n;
long long k;
long long x[400100];
int main() {
  scanf("%d%I64d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%I64d", &x[i]);
  long long mx = 0;
  for (int i = 1; i <= n; i++) mx = max(mx, x[i]);
  if (mx >= k) {
    puts("0");
    return 0;
  }
  for (int i = 1; i <= n; i++) x[i] += x[i - 1];
  if (x[n] >= k) {
    puts("1");
    return 0;
  }
  for (int i = 1; i <= n; i++)
    if (x[i]) {
      for (int j = 1; j <= n; j++) {
        x[j] = x[j + i - 1];
      }
      n -= (i - 1);
      break;
    }
  long long ans;
  if (n == 2) {
    ans = (k - x[2] + x[1] - 1) / x[1];
    cout << ans + 1 << endl;
    return 0;
  }
  if (n == 3) {
    long long st = 0, ed = 2e9 + 1;
    while (st < ed - 1) {
      long long mid = (st + ed) >> 1;
      long long mul = (long long)mid * (mid + 1) / 2;
      if (x[1] > k / mul || x[3] + mid * x[2] + mul * x[1] >= k)
        ed = mid;
      else
        st = mid;
    }
    cout << ed + 1 << endl;
    return 0;
  }
  if (mx >= k) {
    puts("0");
    return 0;
  }
  ans = 0;
  while (x[n] < k) {
    ans++;
    for (int i = 2; i <= n; i++) {
      x[i] += x[i - 1];
      if (x[i] > 0x3f3f3f3f3f3f3f3f) x[i] = 0x3f3f3f3f3f3f3f3f;
    }
  }
  cout << ans + 1 << endl;
  return 0;
}
