import java.util.Scanner; public class Solution { 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 k = 0; int quantity = 0; while (true) { int price = p - k * d; if (price < m) { price = m; } s -= price; if (s >= 0) { quantity++; } else { break; } k++; } System.out.println(quantity); } }