#!/usr/bin/env python #Imports import os import sys import math def videoGame(listOfNums): #initializors costOfVG = listOfNums[0] dLess = listOfNums[1] minPrice = listOfNums[2] currentBalance = listOfNums[3] gamesBought = 0 currentPrice = costOfVG while currentBalance >= currentPrice: gamesBought += 1 currentBalance -= currentPrice if (currentPrice-dLess >= minPrice): currentPrice -= dLess else: currentPrice = minPrice #print str(currentBalance) + " " + str(gamesBought) + " " + str(currentPrice) return gamesBought #numberOfClouds = int(raw_input().strip()) listOfNums = map(int, raw_input().strip().split(' ')) print videoGame(listOfNums)