import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static int howManyGames(int p, int d, int m, int s) { int count = 0; int amnt = s; int k = 0; boolean flag = false; while(amnt > 0) { if(!flag) { amnt = amnt - p; if(amnt < 0) return count; count++; p = p - d; if(p < m) { p = m; flag = true; } } else { amnt = amnt - p; if(amnt < 0) return count; count++; } } return count; } 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 answer = howManyGames(p, d, m, s); System.out.println(answer); in.close(); } }