#!/bin/python3 import sys def howManyGames(p, d, m, s): sum=0 n=0 count=0 cost=0 while(True): if(sum<=s): cost=p-n*d if cost>=m: sum=sum+cost n=n+1 count=count+1 elif costs: return count-1 if __name__ == "__main__": p, d, m, s = input().strip().split(' ') p, d, m, s = [int(p), int(d), int(m), int(s)] answer = howManyGames(p, d, m, s) print(answer)