N,D=map(int,input().split()) x=list(map(int,input().split())) v=list(map(int,input().split())) V=sum(v) start=0 end=D def cond(n): return V*n>=D while end-start>1: test=(end+start)//2 if cond(test): end=test else: start=test print(end)