import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int p = scan.nextInt(),d = scan.nextInt(),m = scan.nextInt(),s = scan.nextInt(); int number = 0; int currentCost = p; while(s > currentCost){ s-=currentCost; number++; if(currentCost-d > m) currentCost-=d; else{ number+=s/m; break; } } System.out.println(number); } }