toInt :: String -> Int
toInt = read :: String -> Int

solve :: Int -> Int -> Int -> Int
solve n a b = (div n (a+b)) * a + min a (mod n (a+b))

main = do
  [n, a, b] <- map toInt . words <$> getLine
  print $ solve n a b