#include<bits/stdc++.h>
#define int long long
using namespace std;
int a[100010];
signed main()
{
int n,m,l=0,r=-1;
cin>>n>>m;
for(int i=0;i<n;i++)
{
scanf("%lld",&a[i]);
int nr;
int nl=ceil(m*1.0/(a[i]*1LL*(i+1)));
if((a[i]-1)*1LL*(i+1)!=0)
nr=floor(m*1.0*1LL/((a[i]-1)*1LL*(i+1)));
else
nr=-1;
if(nl>l)
l=nl;
if((nr<r and nr!=-1) or (nr!=-1 and r==-1))
r=nr;
if(l>r and r!=-1)
break;
}
if(r==-1)
cout<<"xiaogougege";
else
cout<<(l>r?0:r-l+1);
return 0;
}
