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