use std::io::*; use std::str::*; fn read(sl: &mut StdinLock) -> Option { let s = sl.by_ref().bytes().map(|c| c.unwrap() as char) .skip_while(|c| c.is_whitespace()) .take_while(|c| !c.is_whitespace()) .collect::(); s.parse::().ok() } fn main() { let s = stdin(); let mut sl = s.lock(); if let Some(n) = read::(&mut sl) { let sum = (1..(n+1)).sum::(); println!("{}", sum) } }