After wasting too much time trying out on girls in the valentine month, Yash pretty much lost his grip on the course and studies. As a result, his Mid term exams went bad.
Now, Yash has to cover up his marks from the remaining CA and the end term. Two CAs and the Mid terms are over. He is left with third CA and the end terms to save himself from a Re-appear.
To make up his mind for studying, he has to figure out how much marks he needs to pass. Yash's strategy is to pass(40%) separately in CA's and term exams. Overall, he'll naturally pass then.
Ignoring the weightage of exams, calculate remaining CA marks and term marks separately to make them reach 40%.
If total marks in all three CA's fail to make it to 40%, add 10 marks to end term required marks. All CAs and Term exams are counted
CONSTRAINTS
INPUT
OUTPUT