A = list(map(int, input().split())) print(max(A[-2], sum(A)))