#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
	int price[5];

	for (int i = 0; i < 5; i++){
		cin >> price[i];
	}
	
	cout << min(price[0], min(price[1], price[2])) + min(price[3], price[4]) - 50 << endl;

	return (0);
}