#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
  cin.sync_with_stdio(false);
  int n;
  long long K;
  cin >> n >> K;
  vector<int> a(n);
  for (auto& x : a) {
    cin >> x;
    if (x >= K) {
      cout << 0 << endl;
      return 0;
    }
  }
  long long low = 0, high = 1e18;
  while (low <= high) {
    long long mid = (low + high) / 2;
    bool flag = false;
    long long sum = 0, x = mid - 1, y = 0;
    double b = 1;
    for (int i = n - 1; i >= 0; i--) {
      if (a[i]) {
        if (sum + a[i] * b >= K) {
          flag = true;
          break;
        }
        sum += a[i] * b;
      }
      x++, y++;
      b = b * x / y;
      b = min(b, K * 1.1);
    }
    if (flag)
      high = mid - 1;
    else
      low = mid + 1;
  }
  cout << low << endl;
  return 0;
}
