use std::io::*; fn parse(s: &[char]) -> i64 { let mut i = 0; let mut mul = 1; if s[0] == '+' || s[0] == '-' { i += 1; if s[0] == '-' { mul = -1; } } let mut res = 0; while i < s.len() { res = res * 10 + (s[i] as u8 - '0' as u8) as i64; i += 1; } res * mul } fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let s: Vec = itr.next().unwrap().chars().collect(); let mut num = Vec::new(); let mut tmp = Vec::new(); let mut ops = ' '; for i in 0..s.len() { if 0 < i && ops == ' ' && (s[i] == '+' || s[i] == '-') { ops = s[i]; num.push(parse(&tmp)); tmp.clear(); } else { tmp.push(s[i]); } } num.push(parse(&tmp)); println!( "{}", if ops == '+' { num[0] - num[1] } else { num[0] + num[1] } ) }