import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { void run() throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String [] xyz = br.readLine().trim().split(" "); int p = Integer.parseInt(xyz[0]); int d = Integer.parseInt(xyz[1]); int m = Integer.parseInt(xyz[2]); int s = Integer.parseInt(xyz[3]); int price = 0; int count = 0; while(s > 0){ if(p > s){ break; }else{ if(p <= m){ d = 0; p = m; } s = s-p; p = p - d; if(s >= 0) count++; } } System.out.println(count); } public static void main(String[] args) throws Exception { Solution obj = new Solution(); obj.run(); } }