import strutils, sequtils let tmp = stdin.readline.split.map(parseInt) (vl, vr) = (tmp[0], tmp[1]) var d = stdin.readline.parseFloat let w = stdin.readline.parseInt var ans = 0.0 #while d.abs > 1e-7: for _ in 0..10000: let t1 = d / (vr + w).float t2 = (d - (vl + vr).float * t1) / (vl + w).float ans += (t1 + t2) * w.float # echo((t1 + t2) * w.float) d -= (t1 + t2) * (vl + vr).float ans.echo