#include <bits/stdc++.h>
using namespace std;
template <class T>
using v2d = vector<vector<T> >;
template <class T>
bool uin(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
bool uax(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
mt19937 rng(chrono::system_clock::now().time_since_epoch().count());
const int maxN = 2e5 + 10;
const long long inf = 1e18;
int n;
long long k, a[maxN];
bool check(long long d) {
  long long c = 1, x = d - 1, y = 0, sum = 0;
  bool ovf = 0;
  for (int i = n; i; i--) {
    if (a[i] > 0 && (ovf || (long double)sum + (long double)c * a[i] > inf)) {
      return 1;
    }
    if (a[i] > 0) {
      sum += c * a[i];
    }
    if (sum >= k) {
      return 1;
    }
    x++;
    y++;
    if ((long double)c * x / y > inf) {
      ovf = 1;
    } else {
      __int128 tmp = c;
      tmp *= x;
      tmp /= y;
      c = tmp;
    }
  }
  return sum >= k;
}
void solve() {
  cin >> n >> k;
  for (int i = 1; i <= (int)(n); ++i) {
    cin >> a[i];
  }
  if (*max_element(a + 1, a + n + 1) >= k) {
    cout << 0;
    return;
  }
  long long l = 0, r = inf;
  while (r - l > 1) {
    long long mid = (l + r) / 2;
    if (check(mid)) {
      r = mid;
    } else {
      l = mid;
    }
  }
  cout << r;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
