#include int main(){ int n; long long d; scanf("%d%lld",&n,&d); for(int i = 1; i <= n; i++){ int x; scanf("%d",&x); } long long sum = 0; for(int i = 1; i <= n; i++){ long long u; scanf("%lld",&u); sum += u; } long long inf = 1e17+7; long long L = 1, R = inf/sum; //printf("L = %lld, R = %lld\n",L,R); long long res = -1; //overflow... while(L<=R){ long long M = (L+R)/2; if(sum*M>=d){ res = M; R = M-1; } else L = M+1; } printf("%lld\n",res); return 0; }