#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f, oo = inf;
inline long long read() {
  register long long x = 0, f = 1;
  register char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
  return x * f;
}
void write(long long x) {
  if (x < 0) x = -x, putchar('-');
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
void writeln(long long x) {
  write(x);
  puts("");
}
const long long maxn = 200005;
long long n, a[maxn], k;
bool check(long long m) {
  long double sum = 0, s;
  long long p, q;
  for (register long long i = (0); i < (n); ++i) {
    if (a[i] == 0) continue;
    q = n - 1 - i + m - 1;
    p = m - 1;
    p = min(p, q - p);
    s = a[i];
    while (p) {
      s = s * q / p;
      p--, q--;
      if (s >= k) return true;
    }
    sum += s;
    if (sum >= k) return true;
  }
  return false;
}
long long solve(long long l, long long r) {
  long long mid, ans;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (check(mid)) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  return ans;
}
signed main() {
  n = read(), k = read();
  for (register long long i = (0); i < (n); ++i) {
    a[i] = read();
    if (a[i] >= k) {
      puts("0");
      return 0;
    }
  }
  writeln(solve(1, k));
  return 0;
}
