h = list(map(int, input().split()))

print(sum(h)-max(h)) h = list(map(int, input().split())) h list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split print(sum(h)-max(h)) print sum(h)-max(h) sum(h) sum h max(h) max h h = list(map(int, input().split())) list(map(int, input().split())) h
h = list(map(int, input().split()))

print(sum(h)-max(h))