#!/bin/python import sys def howManyGames(p, d, m, s): # Return the number of games you can buy # m is min, p = first price # d is diff # s is the input number of dollars total = 0 curr_price = p curr_dollars = s while curr_price <= curr_dollars: curr_dollars -= curr_price curr_price = max(m, curr_price - d) total += 1 return total if __name__ == "__main__": p, d, m, s = raw_input().strip().split(' ') p, d, m, s = [int(p), int(d), int(m), int(s)] answer = howManyGames(p, d, m, s) print answer