while 1:l=input().split();[b+c in l!=print(a+b*2+c*2+d)for a,b in l for c,d in l]