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