import Control.Applicative

main = do
  ss <- words <$> getLine
  let n = read (ss !! 0) :: Int
  let a = read (ss !! 1) :: Int
  let b = read (ss !! 2) :: Int
  let p = n `div` (a+b)
  let q = n `mod` (a+b)
  let r = min a q
  putStrLn $ show (p*a+r)