x1,x0 = list(map(int, input().split())) y1,y0 = list(map(int, input().split())) su=abs(x0)+abs(x1)+abs(y0)+abs(y1) m=su/4 print(m)