P12290 [AOJ] Lunch
普及
题目描述

problem

At the JOI pasta shop, the recommended pasta for lunch and the set menu of freshly squeezed juice are popular. When ordering this set menu, choose one from each of the three pasta and two juices of the day. The price is the total price of pasta and juice minus 50 yen.

Given the price of pasta and juice for a day, create a program to find the minimum price for the set menu for that day.

output

Output the minimum price of the set menu for the day in one line.

Example

Input

800
700
900
198
330

Output

848

输入格式

见题面

输出格式

见题面

样例输入
800 700 900 198 330
样例输出
848