#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 10;
long long rd() {
  long long t;
  scanf("%I64d", &t);
  return t;
}
int n;
long long A[maxn], k, mx;
bool ok(long long x) {
  double s = 0, tem = 0;
  for (int i = 1; i <= n; i++) {
    if (!A[i]) continue;
    long long p = n - i + x - 1;
    long long q = x - 1;
    q = min(q, p - q);
    tem = A[i];
    for (long long i = 1; i <= q; i++) {
      tem = tem * (p - q + i) / i;
      if (tem >= k) return 1;
    }
    s += tem;
    if (s >= k) return 1;
  }
  return 0;
}
signed main() {
  n = rd(), k = rd();
  for (int i = 1; i <= n; i++) {
    A[i] = rd();
    mx = max(mx, A[i]);
  }
  if (mx >= k) {
    puts("0");
    return 0;
  }
  long long l = 1, r = k;
  while (l <= r) {
    long long mid = (l + r) >> 1;
    if (ok(mid)) {
      r = mid - 1;
    } else
      l = mid + 1;
  }
  cout << l << '\n';
}
