#!/bin/python import sys def howManyGames(p, d, m, s): left,count,price = s,0,p while(True): if left == 0: break if price <= m: price = m left = left - price if left < 0: break else: count += 1 newPrice = price - d if newPrice <= m: newPrice = m price = newPrice return count 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