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