a,b,c=$<.map &:to_i puts (Rational(b*c,c-b)/x=Rational(a*b,b-a)).numerator*x