local function sumDigits(num)
    local sum = 0
    while num > 0 do
        sum = sum + num % 10
        num = math.modf(num / 10)
    end
    return sum
end

local N, A, B = io.read("*n", "*n", "*n")
local total = 0
for i = 1, N do
    local sum = sumDigits(i)
    if sum >= A and sum <= B then
        total = total + 1
    end
end
print(total)