#!/bin/python3 import sys def howManyGames(p, d, m, s): # Return the number of games you can buy ans = 0 if s < p: return ans ans = 1 s -= p cur_price = max(p - d, m) while s >= cur_price: s -= cur_price ans += 1 cur_price = max(cur_price-d, m) return ans if __name__ == "__main__": p, d, m, s = input().strip().split(' ') p, d, m, s = [int(p), int(d), int(m), int(s)] answer = howManyGames(p, d, m, s) print(answer)