A=list(map(int, input().split())) c=0 d=A[2]+1 while A[0]*A[2]>=A[1] and d<=A[3]: c+=1 A[0]-=1 d+=A[2]+1 print(c)