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 in = new Scanner(System.in); int p = in.nextInt(), d = in.nextInt(), m = in.nextInt(), s = in.nextInt(); int count = 0; while (s > 0) { if (s - p >= 0) { s -= p; } else { break; } if (p - d >= m) { p -= d; } else { p = m; } count++; } System.out.println(count); in.close(); } }