import java.io.BufferedOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.*; import java.lang.*; import java.math.*; public class Main{ public static void main(String[] args) { new Main(); } public Main() { FasterScanner sc = new FasterScanner(System.in); FastPrinter printer = new FastPrinter(); int p = sc.nextInt(); int d = sc.nextInt(); int m = sc.nextInt(); int s = sc.nextInt(); int count = 0; while(p>m) { if(s= numChars) { curChar = 0; try { numChars = mIs.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if (numChars <= 0) return -1; } return buf[curChar++]; } public String nextLine() { int c = read(); while (isSpaceChar(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isEndOfLine(c)); return res.toString(); } public String nextString() { int c = read(); while (isSpaceChar(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isSpaceChar(c)); return res.toString(); } public long nextLong() { int c = read(); while (isSpaceChar(c)) c = read(); int sgn = 1; if (c == '-') { sgn = -1; c = read(); } long res = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public int nextInt() { int c = read(); while (isSpaceChar(c)) c = read(); int sgn = 1; if (c == '-') { sgn = -1; c = read(); } int res = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; } public void close() { try { mIs.close(); } catch (IOException e) { e.printStackTrace(); } } } class FastPrinter { PrintWriter writer; /** * Initialize the writer. */ public FastPrinter() { writer = new PrintWriter(new BufferedOutputStream(System.out)); } /** * Print the given String and add a newline. * * @param string * The given String. */ public void println(String string) { writer.println(string); } /** * Print the given String. * * @param string * The given String. */ public void print(String string) { writer.print(string); } public void close() { writer.close(); } } }