import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintStream; import java.io.PrintWriter; import java.util.ArrayList; public class HR3 { static BufferedReader br; static PrintWriter pw = new PrintWriter(System.out); public static void main(String[] args) throws IOException { br = new BufferedReader(new InputStreamReader(System.in)); solve(); pw.close(); br.close(); } static void solve() throws IOException { int[]arr=readIntArr(); int p=arr[0]; int d=arr[1]; int m=arr[2]; int s=arr[3]; int cnt=0; while(s>=p) { s-=p; cnt++; if(p>m) { p-=d; if(p