#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  scanf("%lld %lld", &n, &k);
  int ok = 0;
  vector<long long> v;
  for (int i = 0; i < n; i++) {
    int first;
    scanf("%d", &first);
    if (first != 0) ok = 1;
    if (ok) v.push_back(first);
  }
  if (v.size() > 3) {
    for (auto it : v) {
      if (it >= k) {
        printf("0\n");
        return 0;
      }
    }
    for (int i = 1;; i++) {
      for (int j = 1; j < v.size(); j++) {
        v[j] = v[j - 1] + v[j];
        if (v[j] >= k) {
          printf("%d\n", i);
          return 0;
        }
      }
    }
  } else if (v.size() == 3) {
    for (auto it : v) {
      if (it >= k) {
        printf("0\n");
        return 0;
      }
    }
    long long Max = 2e9, Min = 0;
    while (Max > Min + 1) {
      long long mid = (Max + Min) / 2;
      long long first = mid * (mid + 1) / 2 * v[0];
      long long second = mid * v[1];
      if (first / v[0] != mid * (mid + 1) / 2) {
        Max = mid;
      } else if (first + second + v.back() < 0 ||
                 first + second + v.back() >= k) {
        Max = mid;
      } else {
        Min = mid;
      }
    }
    printf("%lld\n", Max);
  } else {
    for (auto it : v) {
      if (it >= k) {
        printf("0\n");
        return 0;
      }
    }
    printf("%lld\n", (k - v[1] + v[0] - 1) / v[0]);
  }
}
