import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int p = sc.nextInt(), d = sc.nextInt(), m = sc.nextInt(), s = sc.nextInt(); int count = 0; while (s >=0){ if ((p -(count*d)) < m ){ s = s - m; } else{ s = s - (p -(count*d)); } // System.out.print(s+" "); count++; } // System.out.println(); System.out.println(count-1); sc.close(); } }