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