#include <bits/stdc++.h>
using namespace std;
bool flag = false;
vector<vector<unsigned long long> > Ma(32, vector<unsigned long long>(32, 0));
vector<unsigned long long> v;
unsigned long long n, k;
vector<vector<unsigned long long> > mult(
    vector<vector<unsigned long long> > M1,
    vector<vector<unsigned long long> > M2) {
  vector<vector<unsigned long long> > M3(32, vector<unsigned long long>(32, 0));
  for (int i = 0; i < 32; i++) {
    for (int j = 0; j < 32; j++) {
      unsigned long long soma = 0;
      for (int ii = 0; ii < 32; ii++) {
        if (M1[i][ii] and k / M1[i][ii] < M2[ii][j]) flag = true;
        M3[i][j] += M1[i][ii] * M2[ii][j];
        if (M3[i][j] >= k) flag = true;
      }
    }
  }
  return M3;
}
vector<vector<unsigned long long> > identity(unsigned long long k) {
  vector<vector<unsigned long long> > v1(k, vector<unsigned long long>(k, 0));
  for (int i = 0; i < k; i++) v1[i][i] = 1;
  return v1;
}
vector<vector<unsigned long long> > fexp(vector<vector<unsigned long long> > M,
                                         unsigned long long k) {
  if (k == 0) return identity(M.size());
  if (k == 1) return M;
  if (k % 2 == 0)
    return fexp(mult(M, M), k / 2);
  else
    return mult(M, fexp(mult(M, M), (k - 1) / 2));
}
bool check(unsigned long long x) {
  flag = false;
  vector<vector<unsigned long long> > ans = fexp(Ma, x);
  unsigned long long soma = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= i; j++) {
      if (ans[i][j] and k / ans[i][j] < v[j]) flag = true;
      soma += ans[i][j] * v[j];
      if (soma >= k) flag = true;
    }
  }
  return flag;
}
unsigned long long bb(unsigned long long l, unsigned long long r) {
  if (l == r) return l;
  unsigned long long m = (l + r) / 2;
  if (check(m))
    return bb(l, m);
  else
    return bb(m + 1, r);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  unsigned long long ans = 0;
  for (int i = 0; i < n; i++) {
    unsigned long long a;
    cin >> a;
    if (a != 0 or v.size()) v.push_back(a);
    ans = max(ans, a);
  }
  n = v.size();
  unsigned long long c = 1;
  if (ans >= k) {
    cout << 0 << endl;
    return 0;
  }
  if (n > 30) {
    vector<unsigned long long> aux;
    unsigned long long i = 1;
    unsigned long long sum = v[0];
    while (v[i] + sum < k) {
      unsigned long long ax = v[i];
      v[i] += sum;
      sum += ax;
      i = (i + 1) % n;
      if (!i) {
        v.push_back(sum);
        sum = 0;
        c++;
        n++;
      }
    }
    cout << c << endl;
  } else {
    for (int i = 0; i < n; i++)
      for (int j = 0; j <= i; j++) Ma[i][j] = 1;
    unsigned long long c = bb(0, 1 + 1e18 + 1);
    cout << c + 1 << endl;
  }
  return 0;
}
