#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
bool Max(T1& a, T2 b) {
  return a < b ? a = b, 1 : 0;
}
template <typename T1, typename T2>
bool Min(T1& a, T2 b) {
  return a > b ? a = b, 1 : 0;
}
const int N = 200001, M = 300;
long long inf = 1e18;
long long C[M + 1][M + 1];
long long CC(long long n, long long k) {
  if (n - k < k) k = n - k;
  if (n <= M) {
    return C[n][k];
  }
  if (k >= 10) return inf;
  long long t = n - k;
  long long prod = 1;
  for (long long i = 1; i <= k; i++) {
    if ((t + i) / i > inf / prod) return inf;
    long long mod = prod % i;
    prod /= i;
    prod *= t + i;
    prod += (t + i) / i * mod;
  }
  return prod;
}
void solve() {
  long long n, k, v;
  cin >> n >> k;
  long long mx = 0;
  vector<pair<int, int> > a;
  for (int i = 0; i < (n); ++i) {
    cin >> v;
    Max(mx, v);
    if (v) {
      a.emplace_back(v, n - 1 - i);
    }
  }
  if (mx >= k) {
    cout << 0 << '\n';
    return;
  }
  long long l = 0, r = k;
  while (l <= r) {
    long long m = l + r >> 1;
    long long rem = k;
    for (auto& e : a) {
      long long t = CC(e.second + m, m);
      if (rem / e.first < t) {
        rem = 0;
        break;
      }
      rem -= t * e.first;
    }
    if (rem <= 0)
      r = m - 1;
    else
      l = m + 1;
  }
  cout << l + 1 << '\n';
}
void init() {
  C[0][0] = 1;
  for (int i = 1; i <= (M); ++i) {
    C[i][0] = 1;
    for (int j = 1; j <= (i); ++j) {
      C[i][j] = C[i - 1][j] + C[i - 1][j - 1];
      Min(C[i][j], inf);
    }
  }
}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.setf(ios::fixed);
  cout.precision(20);
  init();
  int TC = 1;
  for (int TI = 1; TI <= (TC); ++TI) {
    solve();
  }
  return 0;
}
