x=[] count=0 list=[] amo=0 x=[int(y) for y in input().split()] for i in range(x[0]): if (i+1)*x[2]>x[3]: None elif (i+1)*x[2]>x[1]: None else: amo=i+1 print(str(amo))