#include <bits/stdc++.h>
using namespace std;
inline long long getnum() {
  char c = getchar();
  long long num, sign = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') sign = -1;
  for (num = 0; c >= '0' && c <= '9';) {
    c -= '0';
    num = num * 10 + c;
    c = getchar();
  }
  return num * sign;
}
long long A[200004], B[200004];
int main() {
  int n = getnum();
  long long k = getnum(), ans = 0;
  for (int i = 1; i <= n; i++) {
    A[i] = B[i] = getnum();
    if (B[i] >= k) {
      puts("0");
      return 0;
    }
  }
  int st = 1;
  for (; !A[st]; st++)
    ;
  for (int i = 1, j = st; j <= n; i++, j++) A[i] = B[i] = A[j];
  n = n - st + 1;
  for (long long j = 1; j * n <= 100000000; j++) {
    for (int i = 1; i <= n; i++) {
      B[i] += B[i - 1];
      if (B[i] >= k) {
        cout << j << endl;
        return 0;
      }
    }
  }
  if (n == 2)
    cout << (k - A[n]) / A[n - 1] + ((k - A[n]) % A[n - 1] > 0) << endl;
  else {
    long long l = 1, r = 2e9;
    long long lim = r * r;
    long long ans = (k - A[n - 1]) / A[n - 2] + ((k - A[n - 1]) % A[n - 2] > 0);
    while (l < r) {
      long long m = (l + r) / 2 + (l + r) % 2;
      long long x = m * (m + 1) / 2;
      if (x > lim / A[n - 2] || x * A[n - 2] + m * A[n - 1] + A[n] <= k)
        l = m;
      else
        r = m - 1;
    }
    for (long long m = l - 10; m <= l + 10; m++) {
      long long x = m * (m + 1) / 2;
      if (x * A[n - 2] + m * A[n - 1] + A[n] >= k) {
        cout << m << endl;
        return 0;
      }
    }
  }
}
