use std::io::{self, Read}; fn main() { let mut input = String::new(); io::stdin().read_to_string(&mut input).ok(); let input = input .split_whitespace() .map(|n| n.parse::().unwrap()) .collect::>(); if let &[px, py, qx, qy] = &input[..] { let answer = ((qx - px).abs() + (qy - py).abs()) / 2f64; println!("{}", answer); } }