100 atcoder#ABC160B. [ABC160B] Golden Coins
[ABC160B] Golden Coins
Score : points
Problem Statement
Takahashi loves gold coins. He gains happiness points for each -yen coin he has and gains happiness points for each -yen coin he has. (Yen is the currency of Japan.)
Takahashi has yen. If he exchanges his money so that he will gain the most happiness points, how many happiness points will he earn?
(We assume that there are six kinds of coins available: -yen, -yen, -yen, -yen, -yen, and -yen coins.)
Constraints
- is an integer.
Input
Input is given from Standard Input in the following format:
Output
Print the maximum number of happiness points that can be earned.
1024
2020
By exchanging his money so that he gets two -yen coins and four -yen coins, he gains happiness points, which is the maximum number of happiness points that can be earned.
0
0
He is penniless - or yenless.
1000000000
2000000000
He is a billionaire - in yen.