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