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