def count_Hexadecimal(L, R):
    count = 0
    for n in range(L, R + 1):
        hex_str = hex(n)[2:]  # Remove '0x' prefix
        if all(c in '0123456789abcdef' for c in hex_str) and any(c in 'abcdef' for c in hex_str):
            count += 1
    return count