#include <bits/stdc++.h>
using namespace std;
long long k;
struct matrix {
  long long a[21][21];
  int siz;
  int fg;
  matrix operator*(const matrix &b) const {
    matrix c;
    memset(c.a, 0, sizeof(c.a));
    c.fg = 0;
    long long ka = k;
    int i, j, k;
    for (i = 1; i <= siz; i++)
      for (j = 1; j <= siz; j++)
        for (k = 1; k <= siz; k++) {
          if (!b.a[k][j]) continue;
          if (a[i][k] > ka / b.a[k][j])
            c.a[i][j] = ka;
          else {
            c.a[i][j] += a[i][k] * b.a[k][j];
            if (c.a[i][j] >= ka) c.a[i][j] = ka;
          }
        }
    c.siz = siz;
    return c;
  }
};
int n, a[200010], m;
long long b[200010];
bool calc(long long mid) {
  matrix a, p, c;
  int i, j;
  memset(a.a, 0, sizeof(a.a));
  for (i = 1; i <= m; i++) a.a[1][i] = b[i];
  a.siz = p.siz = c.siz = m;
  a.fg = p.fg = c.fg = 0;
  memset(p.a, 0, sizeof(p.a));
  for (i = 1; i <= m; i++)
    for (j = i; j <= m; j++) p.a[i][j] = 1;
  long long ka = mid;
  while (mid) {
    if (mid & 1) a = a * p;
    mid >>= 1;
    p = p * p;
  }
  for (i = 1; i <= m; i++) {
    if (a.a[1][i] >= k) return true;
  }
  return false;
}
bool ok() {
  int i;
  for (i = 1; i <= m; i++)
    if (b[i] >= k) return true;
  return false;
}
int main() {
  scanf("%d%lld", &n, &k);
  int i;
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  int t = 1;
  while (a[t] == 0) t++;
  m = 0;
  for (i = t; i <= n; i++) b[++m] = a[i];
  if (m <= 10) {
    long long l = 0, r = k, mid;
    while (l <= r) {
      mid = (l + r) >> 1;
      if (calc(mid))
        r = mid - 1;
      else
        l = mid + 1;
    }
    printf("%lld\n", l);
  } else {
    int tot = 0;
    if (ok()) {
      puts("0");
      return 0;
    }
    while (true) {
      bool can = false;
      for (i = 1; i <= m; i++) {
        b[i] += b[i - 1];
        if (b[i] >= k) {
          can = true;
          break;
        }
      }
      tot++;
      if (can) break;
    }
    printf("%d\n", tot);
  }
  return 0;
}
