def count_Hexadecimal(L,R) :
    count = 0
    for num in range(L, R+1):
        hex_str = hex(num)[2:].upper()
        if any(c in hex_str for c in 'ABCDEF'):
            count += 1
    return count