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