#include <bits/stdc++.h>
using namespace std;
const long long oo = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-9;
long long n, k, imax = 0;
vector<long long> a;
template <typename num>
num val(num m) {
  num res = 0;
  num binom = 1;
  for (long long i = (0); i < (imax + 1); i++) {
    if (a[n - 1 - i]) res += binom * a[n - 1 - i];
    binom = (binom * (m + i + 1)) / (i + 1);
  }
  return res;
}
bool test(long long m) {
  if (val(double(m)) > k + 100) return true;
  return val(m) >= k;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> k;
  a.resize(n);
  for (long long i = (0); i < (n); i++) cin >> a[i];
  for (long long i = (0); i < (n); i++)
    if (a[i] >= k) {
      cout << 0 << endl;
      return 0;
    }
  for (long long i = (0); i < (n); i++)
    if (a[n - 1 - i]) imax = i;
  long long lo = -1, hi = 1;
  while (!test(hi)) hi *= 2;
  while (hi - lo > 1) {
    long long mid = (lo + hi) / 2;
    if (test(mid))
      hi = mid;
    else
      lo = mid;
  }
  cout << hi + 1 << endl;
}
