#!/bin/python p, d, m, s = tuple(map(int, raw_input().split())) c = 0 while p > m and s >= p: c += 1 s = s - p p = p - d if p <= m: c += s // m print c