#!/bin/python3 import sys def howManyGames(p, d, m, s): # Return the number of games you can buy count = 0 snew = 0 while s >= snew: if count == 0: snew += p count += 1 else: p = p - d if p >= m: snew = snew + p count += 1 else: snew = snew + m count += 1 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)