#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast,no-stack-protector")
using namespace std;
function<void(void)> ____ = []() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
};
template <typename T>
void operator<<(vector<T> &__container, T x) {
  __container.push_back(x);
}
template <typename T>
ostream &operator<<(ostream &out, vector<T> &__container) {
  for (T _ : __container) out << _ << ' ';
  return out;
}
const int MAXN = 2e5 + 7;
void solve() {
  int n;
  long long int k;
  scanf("%d", &n);
  scanf("%I64d", &k);
  vector<int> A(n);
  for (int &x : A) scanf("%d", &x);
  for (int &x : A)
    if (x >= k) {
      cout << 0 << "\n";
      return;
    }
  long long int l = 1, r = k;
  auto check = [&](long long int m) {
    long double sum = 0;
    for (int i = 0; i < n; i++) {
      if (A[n - 1 - i] == 0) continue;
      long long int nn = i + m - 1;
      long long int mm = min((long long int)i, m - 1);
      long double comb = A[n - 1 - i];
      for (long long int x = 1, y = nn; x <= mm; x++, y--) {
        comb = comb * y / x;
        if (comb >= k) return true;
      }
      sum += comb;
      if (sum >= k) return true;
    }
    return false;
  };
  while (l <= r) {
    long long int mid = (l + r) >> 1;
    if (check(mid))
      r = mid - 1;
    else
      l = mid + 1;
  }
  cout << l << "\n";
}
int main() {
  solve();
  return 0;
}
