Px, Py, Qx, Qy = map(int, open(0).read().split()) print((abs(Px - Qx) + abs(Py - Qy)) / 2)