Px,Py = map(int,input().split()) Qx,Qy = map(int,input().split()) print((abs(Px)+abs(Qx))/2+(abs(Py)+abs(Qy))/2)