Metro cards
Some banks offer cards that can be used to pay for metro rides. Each time you pass through a turnstile with such a card, the passage is recorded. At the end of each calendar month, the total number of passages is calculated, and a charge is deducted from the card based on the number of passages, according to the following rates (as of 15.10.2009):
- If more than 70 trips are made, 850 rubles are charged for the first 70 trips, and 15.71 rubles for each additional trip starting from the 71st. - Additionally, if at least one passage is made with the card during the month, a bank commission of 10 rubles is deducted (regardless of the number of passages). If no passages are made, the commission is not charged.
Petryk and Vasylko, two brothers, have been given such cards by their parents. Sometimes they travel together, and other times they travel separately. When traveling separately, each uses their own card. However, when traveling together, they have the option to either use their own cards or both pass through using one card (resulting in two passages on that card).
They have also realized that in some situations, it is advantageous to make additional passages with the card. For example, if 69 passages have been made in a month, making a 70th passage can reduce the total amount deducted.
Next month, Vasylko plans to make A solo trips, Petryk plans to make B solo trips, and they will make C trips together (resulting in a total of A + B + 2C passages through the turnstiles). Write a program that, given the numbers A, B, and C, calculates the minimum total amount they can spend, taking into account bank commissions and the possibility of making extra passages if beneficial.
Input
The input consists of three integers A, B, and C (each ranging from 0 to 1000).
Output
Output the total amount in rubles that will be deducted from Vasylko's and Petryk's cards, formatted to two decimal places.