line = input().split(" ") vegi = int(line[0]) meat = int(line[1]) meatCons = int(line[2]) vegicons = 1 total = int(line[3]) cnt = 0 while True: vegi -= 1 meat -= meatCons if (vegi < 0 or meat < 0): break total -= (vegicons + meatCons) if (total <= 0): break cnt += 1 print(cnt)