#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
long long k, n;
long long a[N];
bool check(long long t) {
  double sum = 0, s;
  long long p, q;
  for (long long i = 0; i < n; i++) {
    if (a[i] == 0) continue;
    q = n - 1 - i + t - 1;
    p = t - 1;
    p = min(p, q - p);
    s = a[i];
    while (p) {
      s = s * q / p;
      p--, q--;
      if (s >= k) return 1;
    }
    sum += s;
    if (sum >= k) return 1;
  }
  return 0;
}
long long BinaryFind(long long l, long long r) {
  long long mid;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (check(mid))
      r = mid - 1;
    else
      l = mid + 1;
  }
  return l;
}
int main() {
  scanf("%lld%lld", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
    if (a[i] >= k) {
      puts("0");
      return 0;
    }
  }
  printf("%lld\n", BinaryFind(1, k));
}
