solution to String to Integer