{"raw_statement":[{"iden":"problem statement","content":"Snuke has one biscuit and zero Japanese yen (the currency) in his pocket. He will perform the following operations exactly $K$ times in total, in the order he likes:\n\n*   Hit his pocket, which magically increases the number of biscuits by one.\n*   Exchange $A$ biscuits to $1$ yen.\n*   Exchange $1$ yen to $B$ biscuits.\n\nFind the maximum possible number of biscuits in Snuke's pocket after $K$ operations."},{"iden":"constraints","content":"*   $1 \\leq K,A,B \\leq 10^9$\n*   $K,A$ and $B$ are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$K$ $A$ $B$"},{"iden":"sample input 1","content":"4 2 6"},{"iden":"sample output 1","content":"7\n\nThe number of biscuits in Snuke's pocket after $K$ operations is maximized as follows:\n\n*   Hit his pocket. Now he has $2$ biscuits and $0$ yen.\n*   Exchange $2$ biscuits to $1$ yen. his pocket. Now he has $0$ biscuits and $1$ yen.\n*   Hit his pocket. Now he has $1$ biscuits and $1$ yen.\n*   Exchange $1$ yen to $6$ biscuits. his pocket. Now he has $7$ biscuits and $0$ yen."},{"iden":"sample input 2","content":"7 3 4"},{"iden":"sample output 2","content":"8"},{"iden":"sample input 3","content":"314159265 35897932 384626433"},{"iden":"sample output 3","content":"48518828981938099"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}