import exceptions
MAX_INT = 1000
MIN_INT = -1000
def str2int(s):
for i in range(MIN_INT,MAX_INT):
if s == str(i):
return i
raise exceptions.OverflowError
def add2strings(s,t):
return str(str2int(s)+str2int(t))
print add2strings("170","-300")
print add2strings("170","-1001")