a,b=gets.split.map &:to_f c,d=gets.split.map &:to_f p ((a-c).abs+(b-d).abs)/2