https://www.acmicpc.net/problem/5543
arr=[] for _ in range(5): arr.append(int(input())) ham=2000 for i in range(3): if arr[i]<=ham: ham=arr[i] bev=2000 for i in range(3,5): if arr[i]<=bev: bev=arr[i] print(ham+bev-50)