a = map(float, raw_input().split()) b = map(float, raw_input().split()) print (abs(a[0] + b[0]) + abs(a[1] + b[1]) / 2)