#include <bits/stdc++.h>
using namespace std;
int n;
unsigned long long a[200005], k, maxx = 0;
unsigned long long b[200005], nn = 0;
unsigned long long mat[15][15];
void jzxc(unsigned long long a[][15], unsigned long long b[][15]) {
  int i, j, kk;
  unsigned long long c[15][15] = {0};
  for (i = 1; i <= n; i++)
    for (j = 1; j <= n; j++)
      for (kk = 1; kk <= n; kk++) {
        c[i][j] += a[i][kk] * b[kk][j];
        if ((a[i][kk] != 0 && k / a[i][kk] < b[kk][j]) ||
            a[i][kk] * b[kk][j] > k || c[i][j] > k)
          c[i][j] = k;
      }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) a[i][j] = c[i][j];
}
void check(unsigned long long a[][15]) {
  int i, j;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (a[i][j] > k) a[i][j] = k;
}
bool cal(long long ci) {
  int i, j;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= n; j++) {
      if (j >= i)
        mat[i][j] = 1;
      else
        mat[i][j] = 0;
    }
  unsigned long long b[15][15] = {0};
  for (i = 1; i <= n; i++) b[i][i] = 1;
  while (ci) {
    if (ci % 2) jzxc(b, mat);
    jzxc(mat, mat);
    check(mat);
    check(b);
    ci /= 2;
  }
  unsigned long long ans = 0;
  for (int i = 1; i <= n; i++) {
    ans += a[i] * b[i][n];
    if ((a[i] != 0 && k / a[i] < b[i][n]) || a[i] * b[i][n] >= k || ans >= k)
      return true;
  }
  if (ans >= k) return true;
  return false;
}
void solve() {
  long long ans;
  if (maxx >= k || n > 10) {
    ans = 0;
    if (maxx < k) {
      for (ans = 1; 1; ans++) {
        int i;
        for (i = 1; i <= n; i++) {
          a[i] += a[i - 1];
          if (a[i] >= k) break;
        }
        if (i <= n && a[i] >= k) break;
        if (a[n] >= k) break;
      }
    }
  } else {
    long long l = 1, r = 1e18;
    long long mid;
    while (l <= r) {
      mid = (l + r) / 2;
      if (cal(mid)) {
        ans = mid;
        r = mid - 1;
      } else
        l = mid + 1;
    }
  }
  printf("%lld\n", ans);
}
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    maxx = max(a[i], maxx);
  }
  int i;
  for (i = 1; i <= n; i++)
    if (a[i] != 0) break;
  for (i = i; i <= n; i++) b[++nn] = a[i];
  for (i = 1; i <= nn; i++) a[i] = b[i];
  n = nn;
  solve();
  return 0;
}
