import java.util.Scanner; import java.util.StringTokenizer; public class Solution { public static void main(String[] args) { Scanner kboard = new Scanner(System.in); StringTokenizer token = new StringTokenizer(kboard.nextLine()); int p = Integer.parseInt(token.nextToken()), d = Integer.parseInt(token.nextToken()), m = Integer.parseInt(token.nextToken()), s = Integer.parseInt(token.nextToken()); int total = 0; while (s > 0 && p > m) { s -= p; p -= d; total += 1; } if (s < 0) { total -= 1; System.out.println(total); } else { total += s /m; System.out.println(total); } } }