def packed_letter_to_number(letter):
    """Unpack a letter to the corresponding number according to MPC.

    See:
        https://www.minorplanetcenter.net/iau/info/DesDoc.html

    Args:
        letter (str): Single character to decode.

    Returns:
        int: Corresponding number.
    """
    try:
        int(letter)
        return letter.rjust(2, '0')
    except ValueError:
        ord_letter = ord(letter)
        if ord_letter >= 97 and ord_letter <= 122:
            return str(ord_letter - 61)
        elif ord_letter >= 65 and ord_letter <= 96:
            return str(ord_letter - 55)
        else:
            raise ValueError(f'Letter "{letter}" is invalid')