#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T &x) {
  char c;
  bool nega = 0;
  while ((!isdigit(c = getchar())) && (c != '-'))
    ;
  if (c == '-') {
    nega = 1;
    c = getchar();
  }
  x = c - 48;
  while (isdigit(c = getchar())) x = x * 10 + c - 48;
  if (nega) x = -x;
}
template <typename T>
inline void writep(T x) {
  if (x > 9) writep(x / 10);
  putchar(x % 10 + 48);
}
template <typename T>
inline void write(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  writep(x);
}
template <typename T>
inline void writeln(T x) {
  write(x);
  putchar('\n');
}
int n;
long long k;
long long a[200001];
int first;
bool check(long long m) {
  long double an = 0, as = 1;
  for (int i = n; i >= first; i--) {
    an += as * a[i];
    if (an >= k) return 1;
    as *= (m + n - i);
    as /= n - i + 1;
  }
  return 0;
}
int main() {
  read(n);
  read(k);
  first = 0;
  for (int i = 1; i <= n; i++) {
    read(a[i]);
    if (a[i] >= k) {
      puts("0");
      return 0;
    }
    if (!first && a[i] > 0) first = i;
  }
  if (n - first <= 15) {
    long long l = 1, r = k;
    long long m, ans;
    while (l <= r) {
      long long m = (l + r) / 2;
      if (check(m)) {
        ans = m;
        r = m - 1;
      } else
        l = m + 1;
    }
    write(ans);
    return 0;
  }
  int ans = 0;
  long long sum;
  while (a[n] < k) {
    ans++;
    sum = 0;
    for (int i = first; i <= n; i++) {
      sum += a[i];
      if (sum >= k) goto line1;
      a[i] = sum;
    }
  }
line1:;
  writeln(ans);
}
