output_description: Print the number of blue balls that will be there among the first N balls in
  the row of balls.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N A B
attempt: import glob
  
  
  # 問題ごとのディレクトリのトップからの相対パス
  REL_PATH = "ABC\\158\\B"
  
  # テスト用ファイル置き場のトップ
  TOP_PATH = "C:\\AtCoder"
  
  
  class Common:
  
      problem = []
      index = 0
  
      def __init__(self, rel_path):
          self.rel_path = rel_path
  
      def initialize(self, path):
          file = open(path)
          self.problem = file.readlines()
          self.index = 0
          return
  
      def input_data(self):
          try:
              IS_TEST
              self.index += 1
              return self.problem[self.index - 1]
  
          except NameError:
              return input()
  
      def resolve(self):
          pass
  
      def exec_resolve(self):
          try:
              IS_TEST
              for path in glob.glob(TOP_PATH + "\\" + self.rel_path + "/*.txt"):
                  print("Test: " + path)
                  self.initialize(path)
                  self.resolve()
                  print("\n\n")
          except NameError:
              self.resolve()
  
  
  class Solver(Common):
  
      def resolve(self):
  
          q = [int(i) for i in self.input_data().split()]
          N = q[0]
          A = q[1]
          B = q[2]
  
          shou = int(N / (A + B))
          amari = N % (A + B)
  
          if amari <= A:
              result = shou * A + amari
          else:
              result = (shou + 1) * A
  
          print(str(result))
  
  
  solver = Solver(REL_PATH)
  solver.exec_resolve()
  
problem_description: Statement
  
  Takahashi has many red balls and blue balls. Now, he will place them in a row.
  
  Initially, there is no ball placed.
  
  Takahashi, who is very patient, will do the following operation 10^{100}
  times:
  
    * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row.
  
  How many blue balls will be there among the first N balls in the row of balls
  made this way?
samples: [{"input": "8 3 4", "output": "4\n    \n\nLet `b` denote a blue ball, and `r` denote a red ball. The first eight balls\nin the row will be `bbbrrrrb`, among which there are four blue balls.\n\n* * *"}, {"input": "8 0 4", "output": "0\n    \n\nHe placed only red balls from the beginning.\n\n* * *"}, {"input": "6 2 4", "output": "2\n    \n\nAmong `bbrrrr`, there are two blue balls."}]