fn read() -> T { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim().parse().ok().unwrap() } fn main() { let num: i32 = read(); let result = (0..=num).fold(0, |sum, i| i + sum); print!("{}", result); }