#include <bits/stdc++.h>
using namespace std;
const int N = 200001;
const long long MOD = 1e9 + 7;
const double eps = 1e-9;
int n;
long long k, mx = 1e18;
vector<long long> a;
struct matrix {
  vector<vector<long long> > m;
  int x, y;
  matrix(int n) {
    x = n;
    y = n;
    m.resize(n);
    for (int i = 0; i < n; i++) {
      m[i].resize(n);
      for (int j = 0; j < n; j++)
        if (i <= j) m[i][j] = 1;
    }
  }
  matrix(vector<long long> v) {
    x = 1;
    y = v.size();
    m.push_back(v);
  }
  matrix(int x, int y) {
    this->x = x;
    this->y = y;
    m.resize(x);
    for (int i = 0; i < x; i++) m[i].resize(y);
  }
  matrix operator*(const matrix& o) const {
    matrix res(x, o.y);
    for (int i = 0; i < x; i++)
      for (int j = 0; j < o.y; j++)
        for (int k = 0; k < y; k++) {
          long long v = m[i][k] * o.m[k][j];
          if (m[i][k] >= mx || o.m[k][j] >= mx || v < 0 ||
              (m[i][k] && v / m[i][k] != o.m[k][j]) ||
              (o.m[k][j] && v / o.m[k][j] != m[i][k]))
            res.m[i][j] = mx;
          else
            res.m[i][j] += min(mx, v);
          res.m[i][j] = min(mx, res.m[i][j]);
        }
    return res;
  }
  matrix operator^(long long x) {
    if (x == 1) return *this;
    if (x % 2 == 1) return (*this) * ((*this) ^ (x - 1));
    matrix o = (*this) ^ (x / 2);
    return o * o;
  }
};
int main() {
  scanf("%d%lld", &n, &k);
  for (int i = 0, x; i < n; i++) {
    scanf("%d", &x);
    if (a.size() || x) a.push_back(x);
  }
  if (a.back() >= k) {
    puts("0");
    return 0;
  }
  n = a.size();
  if (n >= 4) {
    int ans = 0;
    while (a.back() < k) {
      for (int i = 1; i < n; i++) {
        a[i] += a[i - 1];
        a[i] = min(mx, a[i]);
      }
      ans++;
    }
    printf("%d\n", ans);
  } else {
    long long l = 1, r = (long long)1e18, m, ans = -1;
    while (l <= r) {
      m = (l + r) / 2;
      matrix v1(a);
      matrix v2(n);
      if ((v1 * (v2 ^ m)).m[0].back() >= k) {
        ans = m;
        r = m - 1;
      } else
        l = m + 1;
    }
    printf("%lld\n", ans);
  }
  return 0;
}
