#include <bits/stdc++.h>
using namespace std;
int n, i;
long long k, a[200010], s[200010];
bool check(long long m) {
  long long res = k - a[n];
  double cur = 1;
  for (int i = n - 1; i >= 1; i--) {
    if ((long long)cur >= k) return s[i] >= 1;
    double now = (double)(n + m - i - 1) / (n - i);
    if ((long double)k / cur < now)
      cur = k;
    else
      cur *= now;
    if (a[i] == 0) continue;
    if (res / a[i] + 1 <= (long long)cur) return 1;
    res -= (long long)cur * a[i];
    if (res <= 0) return 1;
  }
  return 0;
}
int main() {
  scanf("%d%lld", &n, &k);
  for (i = 1; i <= n; i++) scanf("%lld", &a[i]);
  for (i = 1; i <= n; i++) {
    if (a[i] >= k) {
      printf("%d\n", 0);
      return 0;
    }
    s[i] = s[i - 1] + a[i];
  }
  long long l = 1, r = 1e18;
  while (l < r) {
    long long mid = (l + r) / 2;
    if (!check(mid))
      l = mid + 1;
    else
      r = mid;
  }
  printf("%lld\n", l);
}
