#include<iostream>
#include<string>
#include<cstdio>
using namespace std;
int main(void){

	int a,b,c,x,y;
	cin>>a>>b>>c>>x>>y;
	int m,n;
	m=min(a,b);
	m=min(m,c);
    n=min(x,y);
    cout<<m+n-50<<endl;

	return 0;
}