import Data.List

main = do
  [n,a,b] <- map read . words <$> getLine :: IO [Int]
  x <- return $ n `div` (a + b)
  y <- return $ n `mod` (a + b)
  z <- return $ y - a

  if z > 0 then
    print $ x*a + z
  else
    print $ x*a
