At the JOI Pasta Shop, a lunch set menu featuring a recommended pasta dish and freshly squeezed juice is very popular. When ordering this set menu, a customer chooses one pasta dish from the $3$ kinds of pasta of the day and one juice from the $2$ kinds of juice of the day. The price of the set menu is the sum of the prices of the chosen pasta and juice minus $50$ yen.
Given the prices of the pasta dishes and juices on a certain day, write a program to find the minimum possible price of the set menu on that day.
Input
The input consists of $5$ lines, each containing a single positive integer.
- The integer on the $1$-st line is the price of the $1$-st pasta dish.
- The integer on the $2$-nd line is the price of the $2$-nd pasta dish.
- The integer on the $3$-rd line is the price of the $3$-rd pasta dish.
- The integer on the $4$-th line is the price of the $1$-st juice.
- The integer on the $5$-th line is the price of the $2$-nd juice.
In the given input data, it is guaranteed that the prices of all pasta dishes and juices are between $100$ yen and $2000$ yen, inclusive.
Output
Output the minimum possible price of the set menu on that day in a single line.
Sample Input and Output
Sample Input 1
800 700 900 198 330
Sample Output 1
848
In Sample $1$, combining the $2$-nd pasta dish and the $1$-st juice gives $700 + 198 - 50 = 848$, which is the minimum price of the set menu on that day.
Sample Input 2
1999 1999 100 189 100
Sample Output 2
150
In Sample $2$, combining the $3$-rd pasta dish and the $2$-nd juice gives $100 + 100 - 50 = 150$, which is the minimum price of the set menu on that day.