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 print(a-u)