#!/bin/python3 import sys def howManyGames(p, d, m, s): ans=0 nextCost=max(p,m) while s>=nextCost: p-=d s-=nextCost #print(p,d,m,s) nextCost=max(p,m) ans+=1 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)