#!/bin/python import sys def howManyGames(p, d, m, s): # Return the number of games you can buy cnt = 0 scost = 0 tp = p while scost + tp <= s: scost += tp cnt += 1 tp = max(tp - d, m) return cnt 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