#include <bits/stdc++.h>
using namespace std;
long long T;
long long mul(long long a, long long b) {
  if ((long double)a * b > T) return T;
  return a * b;
}
void add(long long &a, long long b) {
  a += b;
  if (a > T) a = T;
}
vector<vector<long long> > mul(const vector<vector<long long> > &a,
                               const vector<vector<long long> > &b) {
  int n(a.size()), m(b.size()), k(b[0].size());
  vector<vector<long long> > res(n, vector<long long>(k, 0));
  for (int i(0); i < n; ++i)
    for (int j(0); j < k; ++j)
      for (int q(0); q < m; ++q) add(res[i][j], mul(a[i][q], b[q][j]));
  return res;
}
vector<long long> mul(const vector<long long> &a,
                      const vector<vector<long long> > &b) {
  int n(a.size()), m(b[0].size());
  vector<long long> res(m, 0);
  for (int i(0); i < m; ++i)
    for (int j(0); j < n; ++j) add(res[i], mul(a[j], b[j][i]));
  return res;
}
vector<vector<long long> > bin_pow(vector<vector<long long> > a, long long n) {
  vector<vector<long long> > res(a.size(), vector<long long>(a.size(), 0));
  for (int i(0); i < a.size(); ++i) res[i][i] = 1;
  while (n) {
    if (n & 1) res = mul(res, a);
    a = mul(a, a);
    n >>= 1;
  }
  return res;
}
void next(vector<long long> &arr) {
  for (int i(1); i < arr.size(); ++i) add(arr[i], arr[i - 1]);
}
bool good(const vector<long long> &arr, int cnt) {
  if (cnt) return arr.back() >= T;
  for (long long x : arr)
    if (x >= T) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n >> T;
  vector<long long> base;
  for (int i(0), a; i < n; ++i) {
    cin >> a;
    if (!a && base.empty()) continue;
    base.push_back(a);
  }
  n = base.size();
  if (n > 10) {
    int cnt(0);
    while (!good(base, cnt)) {
      next(base);
      ++cnt;
    }
    cout << cnt;
  } else {
    long long L(-1), R(1e18 + 10);
    vector<vector<long long> > matrix(n, vector<long long>(n, 0));
    for (int i(0); i < n; ++i)
      for (int j(0); j <= i; ++j) matrix[j][i] = 1;
    while (L + 1 < R) {
      long long M((L + R) >> 1);
      if (good(mul(base, bin_pow(matrix, M)), M))
        R = M;
      else
        L = M;
    }
    cout << R;
  }
}
