It accepts more than just numbers though:
>>> print input()
"a"+"b"
ab >>> print input()
"a"+"b"
ab try:print(lambda x:eval(x)if all(i in'0123456789.*/+-'for i in x)else'syntax error')(raw_input())
except:print'error'