#include <bits/stdc++.h>
using namespace std;
int const inf = 1000 * 1000 * 1000;
long long const inf64 = 1ll * inf * inf;
long long Sum(long long x, long long y) { return min(inf64, x + y); }
long long Mul(long long x, long long y) {
  long double res = (long double)x * y;
  if (res > 2e18 + 100) {
    return inf64;
  } else {
    return min(inf64, x * y);
  }
}
vector<long long> p(vector<long long> a) {
  vector<long long> b(a.size());
  long long cur = 0;
  for (int i = 0; i < (int)a.size(); i++) {
    cur = Sum(cur, a[i]);
    b[i] = cur;
  }
  return b;
}
long long f(long long i, long long x, long long y, long long z) {
  long long tmp = i % 2 ? Mul(i, (i + 1) / 2) : Mul(i / 2, i + 1);
  tmp = Mul(tmp, x);
  tmp = Sum(tmp, Sum(Mul(i, y), z));
  return tmp;
}
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  long long k;
  cin >> n >> k;
  vector<long long> a(n);
  int cnt = 0;
  int le = inf;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > 0) {
      le = min(le, i);
      cnt++;
    }
  }
  if (*max_element((a).begin(), (a).end()) >= k) {
    cout << "0\n";
    return 0;
  }
  if (n - le >= 4) {
    reverse((a).begin(), (a).end());
    while (a.back() == 0) a.pop_back();
    reverse((a).begin(), (a).end());
    n = (int)a.size();
    for (int i = 0;; i++) {
      long long mx = i == 0 ? *max_element((a).begin(), (a).end()) : a.back();
      if (mx >= k) {
        cout << i << "\n";
        break;
      }
      a = p(a);
    }
  } else {
    if (n - le == 3) {
      long long x = a[n - 3];
      long long y = a[n - 2];
      long long z = a[n - 1];
      long long bl = 0;
      long long br = inf64;
      long long bm;
      while (br - bl > 1) {
        bm = (bl + br) / 2;
        if (f(bm, x, y, z) >= k) {
          br = bm;
        } else {
          bl = bm + 1;
        }
      }
      if (bl < br && f(bl, x, y, z) >= k) {
        cout << bl << "\n";
      } else {
        cout << br << "\n";
      }
    } else {
      long long x = a[n - 2];
      long long y = a[n - 1];
      long long i = (k - y + x - 1) / x;
      cout << i << "\n";
    }
  }
  return 0;
}
