13 digit product codes: Calculate the last digit (one line of input)