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