#include <iostream>
using namespace std;
int main(){
	int p[3],j[2],minp=2000,minj=2000;
	for(int i=0;i<3;++i){
		cin>>p[i];
		if(minp>p[i])minp=p[i];
	}
	for(int i=0;i<2;++i){
		cin>>j[i];
		if(minj>j[i])minj=j[i];
	}
	cout<<minp+minj-50<<endl;
	return 0;
}