Free chocolate

Free chocolate

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Time Limit: 1.0 s

Memory Limit: 512.0 MB

Description

There is a strange shop in Seriousland which sells chocolates at a rate of 1 taka per chocolate.
But the strange thing is anyone can get a chocolate from the shop in exchange of 2 empty chocolate packet.

If you have \(N\) taka, then how many chocolates you can eat in total ?

Input

Only one integer \(N\)
\(1 <= N <= 100\)

Output

one integer : maximum number of chocolate you can eat with \(N\) taka.

Sample

Input Output
5
9

first of all you can buy 5 chocolate from the shop, after eating all the chocolates you will have 5 empty packet of chocolate.
then you can buy 2 chocolate in exchange of 4 empty chocolate. After eating 2 chocolate you will have 3 empty packets.
then you can buy 1 more chocolate in exchange of 2 empty packet and will have 2 empty packet after eating the current chocolate.
finally you can buy one more chocolate using remaining 2 empty packet and after eating the chocolate you will left with only one empty packet.

so in total you can eat 5 + 2 + 1 + 1 = 9 chocolate

Lu IEEE testing round

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
8
Start at
2025-02-23 08:15
End at
2025-02-26 04:15
Duration
68.0 hour(s)
Host
Partic.
8