#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const long long inf = 0x3f3f3f3f3f3f3f3f;
int n, flag;
long long K;
vector<long long> num;
inline long long add(long long x, long long y) { return min(K, x + y); }
inline long long mul(long long x, long long y) {
  if (y && 1.0 * x - eps >= 1.0 * K / y) return K;
  return x * y;
}
struct matrix {
  long long ma[3][3];
  matrix() { memset(ma, 0, sizeof ma); }
  void init() {
    memset(ma, 0, sizeof ma);
    for (int i = 0; i < n; ++i) ma[i][i] = 1;
  }
  matrix operator*(const matrix &rhs) const {
    matrix ret;
    for (int i = 0; i < n; ++i)
      for (int j = 0; j < n; ++j)
        for (int k = 0; k < n; ++k)
          ret.ma[i][j] = add(ret.ma[i][j], mul(ma[i][k], rhs.ma[k][j]));
    return ret;
  }
};
inline matrix ksm(matrix x, long long n) {
  matrix ret;
  ret.init();
  while (n) {
    if (n & 1) ret = ret * x;
    n >>= 1;
    x = x * x;
  }
  return ret;
}
inline void iter() {
  for (int r = 0;; ++r) {
    for (int i = 0; i < (int)num.size(); ++i)
      if (num[i] == K) {
        printf("%d\n", r);
        return;
      }
    for (int i = 1; i < (int)num.size(); ++i) num[i] = add(num[i], num[i - 1]);
  }
}
inline bool check(long long mid) {
  matrix t;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j <= i; ++j) t.ma[i][j] = 1;
  t = ksm(t, mid);
  for (int i = 0; i < n; ++i) {
    long long temp = 0;
    for (int j = 0; j < n; ++j) {
      temp = add(temp, mul(num[j], t.ma[i][j]));
      if (temp == K) return true;
    }
  }
  return false;
}
inline void solve() {
  n = num.size();
  long long left = 0, right = inf, res = 0;
  while (left <= right) {
    long long mid = (left + right) >> 1;
    if (check(mid)) {
      res = mid;
      right = mid - 1;
    } else
      left = mid + 1;
  }
  printf("%I64d\n", res);
}
int main() {
  scanf("%d%I64d", &n, &K);
  for (int i = 0; i < n; ++i) {
    long long t;
    scanf("%I64d", &t);
    if (!flag && !t) continue;
    num.push_back(t);
    flag |= t;
  }
  if ((int)num.size() > 3)
    iter();
  else
    solve();
  return 0;
}
