xopy = gets _, x, op, y = *xopy.match(/([+-]?\d+)([+-])([+-]?\d+)/) op2 = if op == "+" "-" else "+" end ans = eval("#{x}#{op2}#{y}") puts ans