#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<math.h>
int main(){
	int a[5],mini=100000;
	for(int i=0;i<5;++i){
	scanf("%d",&a[i]);
	}
	for(int i=0;i<3;++i){
		if(mini>a[i]){
			mini=a[i];
		}
	}
	printf("%d\n",mini+std::min(a[3],a[4])-50);
	return 0;
}