a = [int(input()),int(input())]
b = [int(input()),int(input())]

poi = sum(a) + sum(b)
"""
if b[0] == 10:
    c = int(input())
    poi += c
if b[1] == 10:
    d = int(input())
    poi += d
"""
print(poi)


