Solution for problem [String to Integer (atoi)]