#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
long long n, k;
long long a[maxn];
bool check(long long x) {
  double sum = 0, tmp = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] == 0) continue;
    long long y = n - 1 - i;
    long long mm = x - 1, nn = mm + y;
    mm = min(nn - mm, mm);
    tmp = a[i];
    for (long long j = 1; j <= mm; j++) {
      tmp = tmp * (nn - mm + j) / j;
      if (tmp >= k) return true;
    }
    sum += tmp;
    if (sum >= k) return true;
  }
  return false;
}
void solve() {
  long long l = 1, r = k, mid;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (check(mid))
      r = mid - 1;
    else
      l = mid + 1;
  }
  printf("%lld\n", l);
  return;
}
int main() {
  scanf("%lld %lld", &n, &k);
  int flag = 0;
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
    if (a[i] >= k) flag = 1;
  }
  if (flag)
    puts("0");
  else
    solve();
  return 0;
}
