s = list(map(int,input().split())) s.sort() print(sum(s[1:5]))