import java.util.Arrays; import java.util.LinkedList; import java.util.Scanner; public class Main { public static long MOD = 1000000007; public static void main(String[] args) { Scanner sc = new Scanner(System.in); final double vl = sc.nextDouble(); final double vr = sc.nextDouble(); double d = sc.nextDouble(); final double w = sc.nextDouble(); double prev_answer = 0, answer = 0; while(true){ final double go_right_t = d / (w + vr); answer += w * go_right_t; d -= go_right_t * (vl + vr); final double go_left_t = d / (w + vl); answer += w * go_left_t; d -= go_left_t * (vl + vr); if(Math.abs(prev_answer - answer) <= 1e-8){ break; } prev_answer = answer; } System.out.printf("%.8f\n", answer); } }