def calc_check_digit(number):
    """Calculate the check digit for the number."""
    alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    cutoff = lambda x: x - 9 if x > 9 else x
    s = sum(
        cutoff(alphabet.index(n) * 2) if i % 2 == 0 else alphabet.index(n)
        for i, n in enumerate(number[::-1]))
    return str((10 - s) % 10)