#P8627. [蓝桥杯 2015 省 A] 饮料换购

[蓝桥杯 2015 省 A] 饮料换购

Problem Description

Leyangyang Beverage Factory is holding a promotional event. For Leyangyang type C beverages, you can exchange 33 bottle caps for one more type C beverage, and you can keep doing this in a loop (but borrowing or buying on credit is not allowed).

Please calculate: if Xiaoming does not waste any bottle caps and participates in the event as much as possible, then for the nn bottles he initially buys, how many bottles of beverage can he drink in total in the end.

Input Format

An integer nn, meaning the number of beverages bought at the beginning. (0<n<100000<n<10000).

Output Format

An integer, meaning the actual total number of beverages obtained.

100
149
101
151

Hint

Problem H of Group A in the 2015 Lanqiao Cup provincial contest.

Translated by ChatGPT 5