import math._ object Main { def main(args: Array[String]) { val sc = new java.util.Scanner(System.in) val s = sc.nextLine val re = """((?:-|\+)?\d+)(-|\+)((?:-|\+)?\d+)""".r val re(x, op, y) = s val ans = op match { case "+" => x.toInt - y.toInt case "-" => x.toInt + y.toInt } println(ans) } }