import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.StringTokenizer; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top */ public class Solution { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputStream); HalloweenSale solver = new HalloweenSale(); solver.solve(1, in, out); out.close(); } static class HalloweenSale { public void solve(int testNumber, InputReader in, PrintWriter out) { int p = in.nextInt(); int d = in.nextInt(); int m = in.nextInt(); int s = in.nextInt(); int curPrc = p; int ans = 0; while (s >= curPrc) { ans++; s -= curPrc; if (curPrc - d > m) curPrc = curPrc - d; else curPrc = m; } out.println(ans); } } static class InputReader { StringTokenizer st; BufferedReader br; public InputReader(InputStream is) { BufferedReader br = new BufferedReader(new InputStreamReader(is)); this.br = br; } public String next() { if (st == null || !st.hasMoreTokens()) { String nextLine = null; try { nextLine = br.readLine(); } catch (IOException e) { throw new RuntimeException(e); } if (nextLine == null) return null; st = new StringTokenizer(nextLine); } return st.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } } }