#include <bits/stdc++.h>
#pragma GCC diagnostic ignored "-Wunused-result"
using namespace std;
template <class T>
void _R(T &x) {
  cin >> x;
}
void _R(int &x) { scanf("%d", &x); }
void _R(int64_t &x) { scanf("%" PRId64, &x); }
void _R(double &x) { scanf("%lf", &x); }
void _R(char &x) { scanf(" %c", &x); }
void _R(char *x) { scanf("%s", x); }
void R() {}
template <class T, class... U>
void R(T &head, U &...tail) {
  _R(head);
  R(tail...);
}
template <class T>
void _W(const T &x) {
  cout << x;
}
void _W(const int &x) { printf("%d", x); }
void _W(const int64_t &x) { printf("%" PRId64, x); }
void _W(const double &x) { printf("%.16f\n", x); }
void _W(const char &x) { putchar(x); }
void _W(const char *x) { printf("%s", x); }
template <class T>
void _W(const vector<T> &x) {
  for (auto i = x.begin(); i != x.end(); _W(*i++))
    if (i != x.cbegin()) putchar(' ');
}
void W() {}
template <class T, class... U>
void W(const T &head, const U &...tail) {
  _W(head);
  putchar(sizeof...(tail) ? ' ' : '\n');
  W(tail...);
}
template <class T>
inline bool chkmax(T &a, const T &b) {
  return b > a ? a = b, true : false;
}
template <class T>
inline bool chkmin(T &a, const T &b) {
  return b < a ? a = b, true : false;
}
template <class T, class F = less<T>>
void sort_uniq(vector<T> &v, F f = F()) {
  sort(begin(v), end(v), f);
  v.resize(unique(begin(v), end(v)) - begin(v));
}
template <class T>
using MaxHeap = priority_queue<T>;
template <class T>
using MinHeap = priority_queue<T, vector<T>, greater<T>>;
const int64_t INF = 2e18;
int64_t F(int64_t n, int64_t m) {
  int64_t x = 1;
  for (int i = (1); i <= int(m); i++) {
    double tx = double(x) * (n + i) / i;
    if (tx > INF) return INF;
    x = (long double)x * (n + i) / i + 0.5;
  }
  return x;
}
const int N = 2e5 + 10;
int n;
int64_t k, a[N], b[N];
int64_t naive() {
  int64_t ans = 0;
  while (1) {
    if (a[n - 1] >= k) break;
    ans++;
    for (int i = (1); i <= int(n - 1); i++) {
      a[i] += a[i - 1];
      if (a[i] >= INF) a[i] = INF;
    }
  }
  return ans;
}
bool chk(int64_t m) {
  int64_t s = 0;
  for (int i = 0; i < int(n); i++) {
    int64_t t = F(m - 1, i);
    double ns = s + double(t) * a[n - i - 1];
    if (ns >= INF) return 1;
    s += t * a[n - i - 1];
  }
  return s >= k;
}
int main() {
  R(n, k);
  for (int i = 0; i < int(n); i++) R(a[i]);
  int z = 0;
  while (a[z] == 0) z++;
  n -= z;
  for (int i = 0; i < int(n); i++) a[i] = a[i + z];
  auto mx = *max_element(a, a + n);
  if (mx >= k) {
    W(0);
    return 0;
  }
  if (n >= 10) {
    W(naive());
    return 0;
  }
  int64_t l = 1, r = k;
  while (l != r) {
    int64_t m = (l + r) / 2;
    if (chk(m))
      r = m;
    else
      l = m + 1;
  }
  int64_t ans = l;
  W(ans);
  return 0;
}
