solve atoi

careful about the overflow conditions