SP346 COINS - Bytelandian gold coins

题目描述

Byteland有一个非常奇怪的货币体系。 每个Bytelandian金币上都写有一个整数。 一枚金币可以在银行兑换成三枚硬币:n/2,n/3和n/4。 这些数字都要向下取整(如果向上取整的话那银行就不能盈利了啊)。 你也可以拿Bytelandian硬币去换美元,汇率是1:1。 但是你不能拿美元换Bytelandian硬币。 如果你有一个金币,那么你最多可以换到多少美元?

输入格式

输入有多组数据(不超过10个)。 每组数据都只有一行且仅只有一个数字,是金币上写的数字n,范围:0

输出格式

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