#include <bits/stdc++.h>
using namespace std;
const int nsz = 2e5, msz = 75;
const long long inf = 1e18;
int n;
long long k, a[nsz + 5];
long long inline add(long long a, long long b) {
  return a + b >= inf ? inf : a + b;
}
long long inline mul(long long a, long long b) {
  return !a || !b
             ? 0
             : (a == inf || b == inf || (a >= (inf - 1) / b + 1) ? inf : a * b);
}
long long inline gcd(long long a, long long b) {
  return !b ? a : gcd(b, a % b);
}
bool inline chk(long long d) {
  long long sum = 0, C = 1;
  for (int i = n - 1; i >= 0; --i) {
    sum = add(sum, mul(C, a[i]));
    if (C != inf) {
      long long a = n + d - i - 1, d = n - i;
      long long g1 = gcd(C, d);
      C /= g1, d /= g1;
      long long g2 = gcd(a, d);
      a /= g2, d /= g2;
      C = mul(C, a);
    }
  }
  return sum >= k;
}
long long inline solve() {
  long long l = 0, r = inf, md = (l + r) >> 1;
  for (; r - l > 1; md = (l + r) >> 1) {
    (chk(md) ? r : l) = md;
  }
  return r;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> k;
  long long mx = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    mx = max(mx, a[i]);
  }
  if (mx >= k) {
    cout << 0 << '\n';
    return 0;
  }
  cout << solve() << '\n';
}
