#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
long long K, a[200005], b[200005], c[2][200005];
long long mat[10][10], ans[10][10], temp[10][10];
int N, n;
long long mul(long long a, long long b) {
  if (a == 0 || b == 0) return 0;
  if (a == 1) return b;
  if (b == 1) return a;
  long long c = a * b;
  if (c % a == 0 && c % b == 0 && (c / a) == b && (c / b) == a && c <= INF)
    return c;
  return INF;
}
long long calc(long long exp) {
  int i, j, k;
  memset(mat, 0, sizeof mat);
  memset(ans, 0, sizeof ans);
  for (i = 0; i < n; ++i)
    for (j = 0; j < n; ++j)
      if (j <= i) mat[i][j] = 1LL;
  for (i = 0; i < n; ++i) ans[i][i] = 1LL;
  while (exp > 0) {
    if (exp % 2 == 1) {
      for (i = 0; i < n; ++i)
        for (j = 0; j < n; ++j) {
          temp[i][j] = 0;
          for (k = 0; k < n; ++k) {
            temp[i][j] += mul(mat[i][k], ans[k][j]);
            if (temp[i][j] > INF) temp[i][j] = INF;
          }
        }
      for (i = 0; i < n; ++i)
        for (j = 0; j < n; ++j) ans[i][j] = temp[i][j];
    }
    for (i = 0; i < n; ++i)
      for (j = 0; j < n; ++j) {
        temp[i][j] = 0;
        for (k = 0; k < n; ++k) {
          temp[i][j] += mul(mat[i][k], mat[k][j]);
          if (temp[i][j] > INF) temp[i][j] = INF;
        }
      }
    for (i = 0; i < n; ++i)
      for (j = 0; j < n; ++j) mat[i][j] = temp[i][j];
    exp /= 2;
  }
  long long res = 0;
  for (i = 0; i < n; ++i) {
    res += mul(ans[n - 1][i], b[i]);
    if (res > K) res = K;
  }
  return res;
}
long long solve() {
  if (n > 10) {
    if (b[n - 1] >= K) return 0;
    int i, j, id;
    for (i = 0; i < n; ++i) c[0][i] = b[i];
    long long cur;
    for (i = 1;; ++i) {
      cur = 0;
      id = i & 1;
      for (j = 0; j < n; ++j) {
        cur += c[1 - id][j];
        if (cur > K) cur = K;
        c[id][j] = cur;
      }
      if (c[id][n - 1] >= K) return i;
    }
  }
  long long lo = 0, hi = INF, mid;
  while (lo < hi) {
    mid = lo + (hi - lo) / 2;
    if (calc(mid) >= K)
      hi = mid;
    else
      lo = mid + 1;
  }
  return lo;
}
int main() {
  cin >> N >> K;
  int i, j;
  for (i = 0; i < N; ++i) cin >> a[i];
  for (i = 0; i < N && a[i] == 0; ++i)
    ;
  for (j = 0; i < N; ++i) b[j++] = a[i];
  n = j;
  cout << solve() << endl;
  return 0;
}
