Ten mushrooms are placed in a row in front of Mario. Eating a mushroom adds the score written on it to Mario's total.
Mario may eat mushrooms only from the front, in their given order. He may stop whenever he wants, but once he stops, he cannot eat any later mushroom. In other words, he cannot skip a mushroom and then eat a mushroom behind it.
Mario wants his total score to be as close to 100 as possible.
Given the scores of the 10 mushrooms in order, write a program that prints the score Mario will get.
The input consists of 10 lines. Each line contains the score of one mushroom. Every score is a positive integer not greater than 100, and the scores are given in the order of the mushrooms.
Print Mario's final score on the first line. If two possible scores are equally close to 100, choose the larger score.