use std::io::*; use std::str::FromStr; use std::cmp::min; fn read() -> T { let stdin = stdin(); let stdin = stdin.lock(); let token: String = stdin .bytes() .map(|c| c.expect("failed to read char") as char) .skip_while(|c| c.is_whitespace()) .take_while(|c| !c.is_whitespace()) .collect(); token.parse().ok().expect("failed to parse token") } fn main() { let a: u64 = read(); let b: u64 = read(); let c: u64 = read(); let mut v: Vec = vec![a, b, c]; v.sort(); let ret = min(v[2] - v[1], v[1] - v[0]); println!("{}", ret); }