#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
int n;
long long a[N], b[N], k;
bool pre[N];
bool larger(double a, double b) { return b > k * 2 / a; }
bool check(long long m) {
  long long sum = a[n];
  long long upmul = m, downdiv = 1;
  long long mul = 1;
  if (sum >= k) return true;
  for (int i = n - 1; i >= 1; --i) {
    if (!pre[i]) return false;
    if (larger(1.0 * mul / downdiv, 1.0 * upmul)) return true;
    mul = (long long)(1.0 * mul / downdiv * upmul + 0.5);
    if (larger(1.0 * mul, 1.0 * a[i])) return true;
    sum += mul * a[i];
    if (sum >= k) return true;
    upmul++;
    downdiv++;
  }
  return false;
}
int main() {
  cin >> n >> k;
  bool ok = false, okb = false;
  for (int i = 1; i <= n; ++i) {
    scanf("%lld", &a[i]);
    b[i] = b[i - 1] + a[i];
    if (a[i] >= k) ok = true;
    if (b[i] >= k) okb = true;
  }
  if (ok) return 0 * puts("0");
  if (okb) return 0 * puts("1");
  for (int i = 1; i <= n; ++i) {
    if (pre[i - 1] || a[i] != 0) pre[i] = true;
  }
  long long l = 2, r = 1e18 + 7;
  while (l < r) {
    long long mid = l + r >> 1;
    if (!check(mid))
      l = mid + 1;
    else
      r = mid;
  }
  cout << l << endl;
  return 0;
}
