lines = input().split(' ')

N = int(lines[0])

A = int(lines[1])

B = int(lines[2])



nums = [str(x) for x in range(1,N+1)]

total = 0



for i in range(N):

	sum = 0

	l = len(nums[i])

	for j in range(l):

		sum += int(nums[i][j])

	if sum >= A and sum <= B:

		total += int(nums[i])



print(total)

	
n, A, B = list(map(int, input().split()))



def ok(a):

    s = 0

    while a > 0:

        s += a % 10

        a //= 10

    return (A <= s and s <= B)



s = 0

for i in range(1, n+1):

    if ok(i):

        s += i

print(s)
lines = input().split(" ")
N = int(lines[0])
A = int(lines[1])
B = int(lines[2])
nums = [str(x) for x in range(1, N + 1)]
total = 0
for i in range(N):
    sum = 0
    l = len(nums[i])
    for j in range(l):
        sum += int(nums[i][j])
    if sum >= A and sum <= B:
        total += int(nums[i])
print(total)

n, A, B = list(map(int, input().split()))


def ok(a):
    s = 0
    while a > 0:
        s += a % 10
        a //= 10
    return A <= s and s <= B


s = 0
for i in range(1, n + 1):
    if ok(i):
        s += i
print(s)

-lines = input().split(" ") -N = int(lines[0]) -A = int(lines[1]) -B = int(lines[2]) -nums = [str(x) for x in range(1, N + 1)] -total = 0 -for i in range(N): -    sum = 0 -    l = len(nums[i]) -    for j in range(l): -        sum += int(nums[i][j]) -    if sum >= A and sum <= B: -        total += int(nums[i]) -print(total) +n, A, B = list(map(int, input().split())) + + +def ok(a): +    s = 0 +    while a > 0: +        s += a % 10 +        a //= 10 +    return A <= s and s <= B + + +s = 0 +for i in range(1, n + 1): +    if ok(i): +        s += i +print(s)