{"raw_statement":[{"iden":"problem statement","content":"Takahashi has many red balls and blue balls. Now, he will place them in a row.\nInitially, there is no ball placed.\nTakahashi, who is very patient, will do the following operation $10^{100}$ times:\n\n*   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.\n\nHow many blue balls will be there among the first $N$ balls in the row of balls made this way?"},{"iden":"constraints","content":"*   $1 \\leq N \\leq 10^{18}$\n*   $A, B \\geq 0$\n*   $0 < A + B \\leq 10^{18}$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $A$ $B$"},{"iden":"sample input 1","content":"8 3 4"},{"iden":"sample output 1","content":"4\n\nLet `b` denote a blue ball, and `r` denote a red ball. The first eight balls in the row will be `bbbrrrrb`, among which there are four blue balls."},{"iden":"sample input 2","content":"8 0 4"},{"iden":"sample output 2","content":"0\n\nHe placed only red balls from the beginning."},{"iden":"sample input 3","content":"6 2 4"},{"iden":"sample output 3","content":"2\n\nAmong `bbrrrr`, there are two blue balls."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}