tl = [tuple(map(lambda x: abs(int(x)), input().split())),tuple(map(lambda x: abs(int(x)), input().split()))] print(sum((map(sum,tl)))/2)