Calculate the last digit of an ISBN-10 number