# Enter your code here. Read input from STDIN. Print output to STDOUT inputs = input().strip().split(" ") startPrice = int(inputs[0]) difference = int(inputs[1]) endPrice = int(inputs[2]) totalMoney = int(inputs[3]) answer = 0 currPrice = startPrice while (totalMoney >= 0): answer += 1 #print(currPrice) totalMoney -= currPrice if (currPrice - difference >= endPrice): currPrice -= difference else: currPrice = endPrice print(max(answer - 1, 0))