Under construction

Still being built. Things may change

Conveyor Belt Sushi

Time limit1sMemory limit1024 MB

Summary
Given counts of red, green, and blue plates, the task is to compute the total cost at $3, $4, and $5 per plate.
Level

Easy1 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

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.

Hint

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

Examples1

  1. Example 1

    Input
    0
    2
    4
    
    Expected output
    28