{"raw_statement":[{"iden":"background","content":"翻译自 [POI2021-2022R2 Day0 试机题](https://szkopul.edu.pl/problemset/problem/gxeCvLD1xW1t-Y33bbC0n3wZ/statement/)。\n"},{"iden":"statement","content":"初始时你有 $1$ 个物品，你需要将物品的数量按若干次以下步骤增加到 $> n$ 个。\n\n- 选择 $1$：将物品数量存储进数据库中，耗费 $a$ 的时间。\n- 选择 $2$：使物品数量增加等同于数据库中的数量，耗费 $b$ 的时间。\n\n初始时数据库为空，问最小操作次数。"},{"iden":"input","content":"输入一行，共三个整数 $n,a,b\\ (1 \\leq n \\leq 10^{18},1 \\leq a,b \\leq 10^9)$。"},{"iden":"output","content":"输出最小的操作次数。"},{"iden":"note","content":"样例解释：\n\n初始时你有一个物品。  \n先进行一次扫描，耗费 $2$ 时间。  \n然后打印 $2$ 次，耗费 $1 \\times 2 = 2$ 时间，数量增加到 $3$。  \n继续进行扫描，耗费 $2$ 时间。  \n最后再打印 $2$ 次，耗费 $1 \\times 2 = 2$ 时间，数量变为 $9$。\n\n子任务分配：\n\n| 子任务编号 | 特殊性质 | 分值 |\n| :-----------: | :-----------: | :-----------: |\n| $1$ | $a = b = 1$ | $10$ |\n| $2$ | $n \\leq 10^3$ | $40$ |\n| $3$ | $n \\leq 10^5$ | $15$ |\n| $4$ | $n \\leq 10^9$ | $15$ |\n| $5$ | 无特殊限制 | $20$ |\n\n子任务 $0$ 为样例。"}],"translated_statement":null,"sample_group":[["8 2 1","8"]],"show_order":[],"formal_statement":null,"simple_statement":null,"has_page_source":false}