#include <bits/stdc++.h>
#pragma GCC optimize "O3"
using namespace std;
struct mat {
  long long n, m;
  vector<vector<long double> > dat;
  vector<long double> &operator[](long long i) { return dat[i]; }
  mat(long long cn, long long cm)
      : n(cn), m(cm), dat(n, vector<long double>(m)) {}
};
mat MUL(mat a, mat b) {
  long long n = a.n, m = b.m;
  mat c(n, m);
  for (long long i = 0; i < n; i++)
    for (long long j = 0; j < m; j++)
      for (long long k = 0; k < a.m; k++) c[i][j] += a[i][k] * b[k][j];
  return c;
}
mat POW(mat a, long long b) {
  mat sum = a;
  b--;
  while (b) {
    if (b & 1) sum = MUL(sum, a);
    a = MUL(a, a), b >>= 1;
  }
  return sum;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  ;
  long long n, k;
  cin >> n >> k;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) cin >> v[i];
  {
    const long long THRES = 10;
    long long cnt = 0;
    for (long long i = 0; i < n; i++) cnt += v[i] > 0;
    long long c2 = 0;
    for (long long i = n - 1, j = 0; j < THRES && i >= 0; j++, i--)
      c2 += v[i] > 0;
    if (c2 == cnt) {
      vector<long long> v2(THRES);
      for (long long i = 0; i < THRES; i++) {
        if (n - THRES + i >= 0) v2[i] = v[n - THRES + i];
      }
      auto calc = [](vector<long long> &v, long long x) {
        long long n = v.size();
        mat M(1, n);
        for (long long i = 0; i < n; i++) M[0][i] = v[i];
        mat trans(n, n);
        for (long long i = 0; i < n; i++)
          for (long long j = 0; j <= i; j++) trans[j][i] = 1;
        mat rep = !x ? M : MUL(M, POW(trans, x));
        long double mxn = 0;
        for (auto v : rep.dat)
          for (auto x : v) mxn = max(mxn, x);
        return mxn;
      };
      long long a = 0, b = k;
      while (a < b) {
        long long c = (a + b) / 2;
        if (calc(v2, c) >= k)
          b = c;
        else
          a = c + 1;
      }
      cout << a << '\n';
      return 0;
    }
  }
  long long cnt = 0;
  while (*max_element(v.begin(), v.end()) < k) {
    cnt++;
    vector<long long> v2(n);
    for (long long i = 0; i < n; i++) v2[i] = (i ? v2[i - 1] : 0) + v[i];
    v = v2;
  }
  cout << cnt << '\n';
}
