import java.io.* ; public class doit { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ; while (true) { String[] f = br.readLine().split(" ") ; int np = Integer.parseInt(f[0]) ; int nm = Integer.parseInt(f[1]) ; int n0 = Integer.parseInt(f[2]) ; int r = Integer.parseInt(f[3]) ; if (np + nm + n0 + r == 0) break ; int rr = Integer.MAX_VALUE ; for (int nd=0; nd<=100; nd++) { int t0 = (100 + r - 1) / r ; int tp, tm ; if (nd * (r + 2) >= 100) tp = (100 + (r + 2) - 1) / (r + 2) ; else tp = nd + (100 - nd * (r + 2) + r - 1) / r ; if (nd * (r - 1) >= 100) tm = (100 + (r - 1) - 1) / (r - 1) ; else tm = nd + (100 - nd * (r - 1) + r - 1) / r ; int t = np * tp + n0 * t0 + nm * tm ; rr = Math.min(rr, t) ; } System.out.println(rr) ; } } }