COINS - Bytelandian gold coins

题意翻译

题目描述 Byteland有一个非常奇怪的货币体系。 每个Bytelandian金币上都写有一个整数。 一枚金币可以在银行兑换成三枚硬币:n/2,n/3和n/4。 这些数字都要向下取整(如果向上取整的话那银行就不能盈利了啊)。 你也可以拿Bytelandian硬币去换美元,汇率是1:1。 但是你不能拿美元换Bytelandian硬币。 如果你有一个金币,那么你最多可以换到多少美元? 输入输出格式 输入格式: 输入有多组数据(不超过10个)。 每组数据都只有一行且仅只有一个数字,是金币上写的数字n,范围:0<=n<=1 000 000 000。 输出格式: 对于每组数据输出你最多能换来的美元(一行一个)。

题目描述

In Byteland they have a very strange monetary system. Each Bytelandian gold coin has an integer number written on it. A coin n can be exchanged in a bank into three coins: n/2, n/3 and n/4. But these numbers are all rounded down (the banks have to make a profit). You can also sell Bytelandian coins for American dollars. The exchange rate is 1:1. But you can not buy Bytelandian coins. You have one gold coin. What is the maximum amount of American dollars you can get for it?

输入输出格式

输入格式


The input will contain several test cases (not more than 10). Each testcase is a single line with a number n, 0 <= n <= 1 000 000 000. It is the number written on your coin.

输出格式


For each test case output a single line, containing the maximum amount of American dollars you can make.

输入输出样例

输入样例 #1

12
2

输出样例 #1

13
2