l = list(map(int,input().split()))
a = 0
b = 1
c = 1
while c <= l[0]:
    if a + b >= l[1] and a + b <= l[2]:
        sum += c
    if b == 9:
        b = 0
        a += 1
    else:
        b += 1
    c = 10 * a + b
print(sum)
