#include <bits/stdc++.h>   using namespace std;   const int MAX_SIZE = 10;   int n;   unsigned long long adj[200010], k;   struct Matrix {     unsigned long long a[MAX_SIZE][MAX_SIZE];     Matrix() {       for (int i = 0; i < MAX_SIZE; i++)         for (int j = 0; j < MAX_SIZE; j++) a[i][j] = 0;     }     Matrix mul(Matrix m) {       Matrix res = Matrix();       for (int i = 0; i < MAX_SIZE; i++) {         for (int j = 0; j < MAX_SIZE; j++) {           for (int z = 0; z < MAX_SIZE; z++) {             if (a[i][z] != 0 && m.a[z][j] != 0 &&                 (a[i][z] >= k || m.a[z][j] >= k || (a[i][z] > k / m.a[z][j]) ||                  res.a[i][j] >= (k - a[i][z] * m.a[z][j])))               res.a[i][j] = k;             else               res.a[i][j] += a[i][z] * m.a[z][j];             res.a[i][j] = min(res.a[i][j], k);             if (res.a[i][j] == k) break;           }         }       }       return res;     }     void toIndentity() {       for (int i = 0; i < MAX_SIZE; i++)         for (int j = 0; j < MAX_SIZE; j++) a[i][j] = i == j ? 1 : 0;     }     void toRightMatrix() {       for (int i = 0; i < MAX_SIZE; i++)         for (int j = 0; j < MAX_SIZE; j++) a[i][j] = i <= j ? 1 : 0;     }   };   struct Vector {     unsigned long long a[MAX_SIZE];     int size;     Vector(int _size = MAX_SIZE) {       size = _size;       for (int i = 0; i < MAX_SIZE; i++) a[i] = 0;     }     Vector mul(Matrix m) {       Vector res = Vector(size);       for (int i = 0; i < size; i++) {         for (int j = 0; j < size; j++) {           if (m.a[j][i] != 0 && a[j] != 0 &&               (m.a[j][i] >= k || a[j] >= k || m.a[j][i] > k / a[j] ||                res.a[i] >= (k - m.a[j][i] * a[j])))             res.a[i] = k;           else             res.a[i] += m.a[j][i] * a[j];           res.a[i] = min(res.a[i], k);           if (res.a[i] == k) break;         }       }       return res;     }     bool hasSolution() {       int res = false;       for (int i = 0; i < size; i++)         if (a[i] >= k) {           res = true;           break;         }       return res;     }   };   Matrix pow(Matrix m, unsigned long long p) {     Matrix res = Matrix();     res.toIndentity();     while (p > 0) {       if (p % 2 == 0) {         m = m.mul(m);         p /= 2;       } else {         res = res.mul(m);         p--;       }     }     return res;   }   bool solve(Vector v, unsigned long long p) {     Matrix m = Matrix();     m.toRightMatrix();     m = pow(m, p);     return v.mul(m).hasSolution();   }   int main() {     cin >> n >> k;     for (int i = 0; i < n; i++) cin >> adj[i];     unsigned long long res = 0;     for (int i = 0; i < n; i++)       if (adj[i] >= k) {         cout << res;         return 0;       }     int j = 0;     for (int i = 0; i < n; i++)       if (adj[i] != 0) {         j = i;         break;       }     for (int i = 0; i < n - j; i++) adj[i] = adj[i + j];     n -= j;     if (n > MAX_SIZE) {       while (true) {         res++;         for (int i = 1; i < n; i++) {           adj[i] += adj[i - 1];           if (adj[i] >= k) {             cout << res;             return 0;           }         }       }     } else {       Vector v = Vector(n);       for (int i = 0; i < n; i++) v.a[i] = adj[i];       unsigned long long l = 1, r = k, m;       while (l + 1 < r) {         m = (l + r) / 2;         if (solve(v, m))           r = m;         else           l = m + 1;       }       res = (l < r && solve(v, l)) ? l : r;       cout << res;     }     return 0;   }