import java.io.*; public class MCompet { private static int inBufNextByte, inBufNextIndex, inBufCurReadByteSize; private static int outBufNextIndex; private static InputStream is = System.in; private static OutputStream os = System.out; private static final int IN_BUF_SIZE = (1 << 15); private static final int OUT_BUF_SIZE = (1 << 15); private static final byte IN_BUFFER[] = new byte[IN_BUF_SIZE]; private static final byte OUT_BUFFER[] = new byte[OUT_BUF_SIZE]; private static final String IN_FILE_PATH = new File("").getAbsolutePath() + "/in.txt"; private static final String OUT_FILE_PATH = new File("").getAbsolutePath() + "/out.txt"; private static final String LINE_SEPARATOR = System.getProperty("line.separator"); private MCompet() throws Exception { if (INPUT_FROM_FILE) is = new FileInputStream(IN_FILE_PATH); if (OUTPUT_TO_FILE) os = new FileOutputStream(OUT_FILE_PATH); nc(); solve(); is.close(); flushOutBuf(); os.close(); } public static void main(String[] args) { try { new MCompet(); } catch (Exception e) { e.printStackTrace(); } } private boolean isDigit(int cp) { return 48 <= cp && cp <= 57; } private boolean isLowercase(int cp) { return 97 <= cp && cp <= 122; } private boolean isUppercase(int cp) { return 65 <= cp && cp <= 90; } private boolean isAlphabet(int cp) { return isLowercase(cp) || isUppercase(cp); } private boolean isCharacter(int cp) { return cp != -1; } private boolean isWhitespace(int cp) { return (9 <= cp && cp <= 13) || (cp == 32); } private boolean isWordSeparator(int cp) { return (9 <= cp && cp <= 13) || (cp == 32) || (cp == '@') || (cp == ';'); } private boolean isLineSeparator(int cp) { return cp == 10 || cp == 13; } private int nc() throws IOException { if (inBufNextIndex >= inBufCurReadByteSize) { inBufCurReadByteSize = is.read(IN_BUFFER, 0, IN_BUF_SIZE); if (inBufCurReadByteSize == -1) return inBufNextByte = -1; inBufNextIndex = 0; } return inBufNextByte = IN_BUFFER[inBufNextIndex++]; } private char[] nc(int n) throws IOException { while (isWhitespace(inBufNextByte)) nc(); char a[] = new char[n]; for (int i = 0; i < n; ++i) { a[i] = (char) inBufNextByte; nc(); } return a; } private char[][] nc(int r, int c) throws IOException { char a[][] = new char[r][c]; for (int i = 0; i < r; ++i) a[i] = nc(c); return a; } private boolean isMinus() throws IOException { boolean minus = false; while (inBufNextByte == '+' || inBufNextByte == '-') { if (inBufNextByte == '-') minus = !minus; nc(); } return minus; } private Integer ni() throws IOException { while (isWhitespace(inBufNextByte)) nc(); int res = 0; boolean minus = isMinus(); if (!isDigit(inBufNextByte)) return null; while (true) { res = (res << 1) + (res << 3) + inBufNextByte - '0'; if (!isDigit(nc())) break; } return minus ? -res : res; } private int[] ni(int n) throws IOException { int a[] = new int[n]; for (int i = 0; i < n; ++i) a[i] = ni(); return a; } private int[][] ni(int r, int c) throws IOException { int a[][] = new int[r][c]; for (int i = 0; i < r; ++i) a[i] = ni(c); return a; } private Long nl() throws IOException { while (isWhitespace(inBufNextByte)) nc(); long res = 0; boolean minus = isMinus(); if (!isDigit(inBufNextByte)) return null; while (true) { res = (res << 1) + (res << 3) + inBufNextByte - '0'; if (!isDigit(nc())) break; } return minus ? -res : res; } private long[] nl(int n) throws IOException { long a[] = new long[n]; for (int i = 0; i < n; ++i) a[i] = nl(); return a; } private long[][] nl(int r, int c) throws IOException { long a[][] = new long[r][c]; for (int i = 0; i < r; ++i) a[i] = nl(c); return a; } private Double nd() throws IOException { while (isWhitespace(inBufNextByte)) nc(); boolean minus = isMinus(); if (!isDigit(inBufNextByte)) return null; StringBuilder sb = new StringBuilder(); sb.append((char) inBufNextByte); while (isDigit(nc())) sb.append((char) inBufNextByte); if (inBufNextByte == '.') { sb.append('.'); while (isDigit(nc())) sb.append((char) inBufNextByte); } double res = Double.parseDouble(sb.toString()); return minus ? -res : res; } private double[] nd(int n) throws IOException { double a[] = new double[n]; for (int i = 0; i < n; ++i) a[i] = nd(); return a; } private double[][] nd(int r, int c) throws IOException { double a[][] = new double[r][c]; for (int i = 0; i < r; ++i) a[i] = nd(c); return a; } private String line() throws IOException { while (isWhitespace(inBufNextByte)) nc(); StringBuilder sb = new StringBuilder(); while (isCharacter(inBufNextByte) && !isLineSeparator(inBufNextByte)) { sb.append((char) inBufNextByte); nc(); } return sb.toString(); } private String ns() throws IOException { while (isWordSeparator(inBufNextByte)) nc(); StringBuilder sb = new StringBuilder(); while (isCharacter(inBufNextByte) && !isWordSeparator(inBufNextByte)) { sb.append((char) inBufNextByte); nc(); } return sb.toString(); } private String[] ns(int n) throws IOException { String a[] = new String[n]; for (int i = 0; i < n; ++i) a[i] = ns(); return a; } private String[][] ns(int r, int c) throws IOException { String a[][] = new String[r][c]; for (int i = 0; i < r; ++i) a[i] = ns(c); return a; } private void flushOutBuf() { if (outBufNextIndex == 0) return; try { os.write(OUT_BUFFER, 0, outBufNextIndex); os.flush(); outBufNextIndex = 0; } catch (Exception e) { e.printStackTrace(); } } private void print(String format, Object[] args) { if (args != null) format = String.format(format, args); for (int i = 0, n = format.length(); i < n; ++i) { OUT_BUFFER[outBufNextIndex++] = (byte) format.charAt(i); if (outBufNextIndex >= OUT_BUF_SIZE) flushOutBuf(); } } private void print(T ob) { print(ob + "", null); } private void println(T ob) { print(ob + LINE_SEPARATOR, null); } private void println(String format, Object... args) { print(format + LINE_SEPARATOR, args); } private void log(T ob) { print("\u001B[31m" + ob + "\u001B[0m", null); } private void log(String format, Object... args) { print("\u001B[31m" + format + "\u001B[0m", args); } private void logln(T ob) { print("\u001B[31m" + ob + "\u001B[0m\n", null); } private void logln(String format, Object... args) { print("\u001B[31m" + format + "\u001B[0m\n", args); } int mod = (int) 1E9 + 7; private void solve() throws Exception { int cost = ni(), diff = ni(), min = ni(), s = ni(); int ans = 0, sum = 0; while (true) { sum += cost; if (sum > s) break; ++ans; if (cost - diff > min) cost -= diff; else cost = min; } println(ans); } private static final boolean INPUT_FROM_FILE = false, OUTPUT_TO_FILE = false; }