#!/bin/python3 import sys def howManyGames(p, d, m, s): # Return the number of games you can buy buyable = 0 #canbuy = True total = 0 i = 0 while (True): if (p - (i * d) <= m): total += m else: total += p - (i * d) if (total > s): return i break i += 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)