#include<bits/stdc++.h>
using namespace std;

int main(){
	int a,b,c,d,e,mn1,mn2;
	cin>>a>>b>>c>>d>>e;
	if(a<=b && a<=c) mn1=a;
	if(b<=a && b<=c) mn1=b;
	if(c<=b && c<=a) mn1=c;
	if(d<=e) mn2=d;
	else{ mn2=e;}

	cout<<mn1+mn2-50<<endl;
    return 0;
}
