#include <bits/stdc++.h>
using namespace std;
const unsigned long long INF = 1LL << 63 - 1;
unsigned long long n, k;
unsigned long long a[200001];
bool pass() {
  for (int i = 1; i < n; i++) {
    a[i] += a[i - 1];
    if (a[i] >= k) return true;
  }
  return false;
}
unsigned long long s3(unsigned long long i) { return i * (i * a[0] + a[1]); }
int main() {
  cin >> n >> k;
  cin >> a[0];
  while (a[0] == 0) {
    n--;
    scanf("%lld", a);
  }
  for (int i = 1; i < n; i++) {
    scanf("%lld", a + i);
    if (a[i] >= k) return cout << 0, 0;
  }
  if (n == 2) return cout << (k - a[1] + a[0] - 1) / a[0], 0;
  if (n == 3) {
    k -= a[2];
    k *= 2;
    a[1] *= 2;
    a[1] += a[0];
    unsigned long long l = 0, h = sqrt(k / a[0]) + 1;
    while (l < h) {
      unsigned long long mid = (l + h) / 2;
      if (s3(mid) < k)
        l = mid + 1;
      else
        h = mid;
    }
    return cout << l, 0;
  }
  unsigned long long p = 1;
  while (1) {
    if (pass()) break;
    p++;
  }
  cout << p;
  return 0;
}
