#!/bin/python3 import sys def howManyGames(p, d, m, s): total=0 games=0 while True: total+=p if total>s: break games+=1 if (p-d)>=m: p=p-d else: p=m return games 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)