https://www.acmicpc.net/problem/5543
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int arr[]=new int[5];
for(int i=0;i<5;i++){
arr[i]=s.nextInt();
}
int ham=2000;
for(int i=0;i<3;i++){
if(arr[i]<=ham) ham=arr[i];
}
int bev=2000;
for(int i=3;i<5;i++){
if(arr[i]<=bev) bev=arr[i];
}
System.out.format("%d",ham+bev-50);
}
}