Problem list
Log in
#r03600 · CCC 2024 Junior

Conveyor Belt Sushi

Bronze V 2.0 s 256 MB

There is a new conveyor belt sushi restaurant in town. Plates of sushi travel around the restaurant on a raised conveyor belt and customers choose what to eat by removing plates.

Each red plate of sushi costs $$3$, each green plate of sushi costs $$4$, and each blue plate of sushi costs $$5$.

Your job is to determine the cost of a meal, given the number of plates of each colour chosen by a customer.

Input

The first line of input contains a non-negative integer, $R$, representing the number of red plates chosen. The second line contains a non-negative integer, $G$, representing the number of green plates chosen. The third line contains a non-negative integer, $B$, representing the number of blue plates chosen.

Output

Output the non-negative integer, $C$, which is the cost of the meal in dollars.

Example 1

Input
0
2
4
Output
28

This customer chose $0$ red plates, $2$ green plates, and $4$ blue plates. Therefore, the cost of the meal in dollars is $0 \times 3 + 2 \times 4 + 4 \times 5 = 28$.

Source
CCC 2024 Junior
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code