a = gets.split(" ") b = gets.split(" ") a.map!{|c| c.to_f} b.map!{|d| d.to_f} x = (a[0] - b[0]).abs y = (a[1] - b[1]).abs puts (x + y) / 2