ax, ay = map(int, input().split()) bx, by = map(int, input().split()) print((abs(ax) + abs(ay) + abs(bx) + abs(by))/2)