Write a program to convert a string into a number (for example, "1").
Implement string_to_number(s) without using Python's int() conversion. The input contains an optional leading + or - followed by one or more decimal digits, with no whitespace or other characters. Return the corresponding integer.
Function signature: def string_to_number(s):
Input: A non-empty string representing a valid signed decimal integer.
Output: The integer represented by the string.
def string_to_number(s):