def get_number(input):
    """Return value of hex or decimal numeric input string."""
    if input.endswith(('h', 'H')):
        base = 16
    elif input.endswith(('q', 'Q')):
        base = 8
    elif input.endswith(('b', 'B')):
        base = 2
    else:
        base = 10

    if base != 10:
        number = int(input[:-1], base)
    else:
        number = int(input)

    return number