407573: GYM102832 A Krypton

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

A. Kryptontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

In the future several years, you will surely remember that you once participated in a special China Collegiate Programming Contest. Due to COVID-19, all parties had paid a lot of effort to eventually hold a rare online programming contest. As a problem writer, I would also like to express my sincere gratitude to the organizing committee, all the contestants and others who have worked hard in this process. I also sincerely wish you good results in this special contest and a special and sweat memory in the future.

Maybe several years later, you may recall that ...

Once there was a mobile game, where there was a virtual currency called coupon that could only be purchased by RMB. Kelo found that relying on his liver alone cannot make him stronger, so he decided to purchase some coupons. When he opened the recharge page, he found that this game had seven recharge columns, and was holding an activity called "First Recharge Reward". If it was the first time a recharge column was chosen, some additional coupons would be given to the player as a reward. A player might receive several rewards if he chose several different recharge columns. A column could be chosen for arbitrary times, but there would be no additional reward except for the first time it was chosen. Here is a table describing the price, amount of coupons in normal case and additional first recharge rewards of each column.

$$$$$$\begin{array}{|c|c|c|} \hline \text{Price (RMB yuan)} & \text{Normal amount (coupons)} & \text{First recharge reward (coupons)} \\ \hline 1 & 10 & 8 \\ \hline 6 & 60 & 18 \\ \hline 28 & 280 & 28 \\ \hline 88 & 880 & 58 \\ \hline 198 & 1980 & 128 \\ \hline 328 & 3280 & 198 \\ \hline 648 & 6480 & 388 \\ \hline \end{array}$$$$$$

Kelo had recently earned $$$n$$$ yuan by writing problems for China Collegiate Programming Contest. He decided to recharge all these $$$n$$$ yuan to the game, and hoped to get as many coupons as possible with these hard-earned money.

Input

The only line contains an only integer $$$n$$$ ($$$1 \leq n \leq 2000$$$).

Output

Print the maximum amount of coupons Kelo might get.

ExamplesInput
100
Output
1084
Input
198
Output
2108

加入题单

上一题 下一题 算法标签: