The best-selling item at Sanggeunald is the combo meal. When ordering, you choose one hamburger and one drink and buy them together as a combo; the combo's price is the sum of the two prices minus 50 won.
There are three hamburgers — the Sangdeok Burger, the Jungdeok Burger, and the Hadeok Burger — and two drinks, cola and cider.
Given the price of each hamburger and each drink, write a program that prints the price of the cheapest possible combo meal.
The input consists of five lines. The first line gives the price of the Sangdeok Burger, the second line the price of the Jungdeok Burger, and the third line the price of the Hadeok Burger. The fourth line gives the price of the cola, and the fifth line the price of the cider. Every price is between 100 and 2000 won, inclusive.
Print the price of the cheapest combo meal on the first line.