Calculate the last digit of a credit card number