# Enter your code here. Read input from STDIN. Print output to STDOUT price,diff,minn,wallet=map(int,raw_input().split()) games=0 while wallet>0: if price>wallet: break wallet-=price if price-diff>=minn: price-=diff elif price>minn: price=minn games+=1 print games