a,b,c,d=map(int,input().split()) k=0 u=a while True: if u==0: break elif bd: break else: u,b=u-1,b-c k+=1+c print(a-u)