qyliang/CodeNanoFix huggingface dataset:
# Buggy code:
N = int(input())
LIST = [input() for i in range(N)]
LIST.sort()

cnt = 1
tmp = LIST.pop()
while True:
    if len(LIST) == 0:
        break
    if LIST.pop() < tmp:
        cnt = cnt + 1

print(cnt)

# Fixed code:
N = int(input())
LIST = [input() for i in range(N)]
LIST.sort()

cnt = 1
tmp = LIST.pop()
while True:
    if len(LIST) == 0:
        break
    Di = LIST.pop()
    if Di < tmp:
        cnt = cnt + 1
        tmp = Di

print(cnt)
# Buggy code:
N=input()
di = []
for i in range(N):
    di.append(input())
print(len(list(set(di))))

# Fixed code:
N=input()
di = []
for i in range(int(N)):
    di.append(int(input()))
print(len(list(set(di))))
# Buggy code:
n = int(input())
d = [int(input()) for i in range(n)]
cnt = 1
d = sorted(d)
print(d)
for i in range(n-1):
    if d[i+1] > d[i]:
        cnt += 1
    elif d[i+1] < d[i]:
        break
print(cnt)

# Fixed code:
n = int(input())
d = [int(input()) for i in range(n)]
cnt = 1
d = sorted(d)
for i in range(n-1):
    if d[i+1] > d[i]:
        cnt += 1
    elif d[i+1] < d[i]:
        break
print(cnt)
# Buggy code:
N = int(input())
a = []
for i in range(N):
  a.append(int(input()))
a.sort
count = 1
i = 0
while i < N-1:
  if a[i] != a[i+1]:
    count += 1
  i += 1
print(count)

# Fixed code:
N = int(input())
a = []
for i in range(N):
  a.append(int(input()))
a.sort()
count = 1
j = 0
while j < N-1:
  if a[j] != a[j+1]:
    count += 1
  j += 1
print(count)
# Buggy code:
n = int(input())
an = []
cnt = 0

for i in range(n):
  an.append(int(input()))
  
sorted_an = sorted(an, reverse=True)

for i in range(len(sorted_an)-1):
  if i == 0:
    cnt += 1
  else:
    if sorted_an[i] > sorted_an[i+1]:
      cnt += 1

print(cnt)

# Fixed code:
n = int(input())
an = []
cnt = 1

for i in range(n):
  an.append(int(input()))
  
sorted_an = sorted(an, reverse=True)

for i in range(len(sorted_an)-1):
  if sorted_an[i] > sorted_an[i+1]:
    cnt += 1

print(cnt)
# Buggy code:
N  = int(input())
num = list(map(int, input().split()))
num.sort()
count = 1

for i in range(N-1):
    if not num[i] == num[i+1]:
        count += 1
print(count)

# Fixed code:
N  = int(input())
num = list(map(int, (input() for h in range(N))))
num.sort()
count = 1

for i in range(N-1):
    if not num[i] == num[i+1]:
        count += 1
print(count)
# Buggy code:
N = int(input())

d = []

for i in range(N):
    d.append(int(input()))
    print(d[i])

print(len(set(d)))


# Fixed code:
N=int(input())
a=[]

for i in range(N):
    d=int(input())
    a.append(d)

a=set(a)

print(len(a))
# Buggy code:
n = int(input())

lst = list(map(int, [input() for i in range(n)]))

set(lst)

print(len(lst))

# Fixed code:
n = int(input())

lst = map(int, [input() for i in range(n)])

print(len(set(lst)))
# Buggy code:
n = int(input())

d = []
for i in range(n):
    d.append(int(input()))

d_2 = sorted(d, reverse=True)
ans = 1
for i in range(1, n):
    if d_2[i] < d_2[i-1]:
        ans += 1
    else:
        break

print(ans)

# Fixed code:
n = int(input())

d = []
for i in range(n):
    d.append(int(input()))

d_2 = sorted(d, reverse=True)
ans = 1
for i in range(1, n):
    if d_2[i] < d_2[i-1]:
        ans += 1
    else:
        continue

print(ans)
# Buggy code:
N = int(input())
A = []
for i in len(N):
    A.append(int(input))
print(len(set(A)))

# Fixed code:
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
print(len(set(A)))
# Buggy code:
N = int(input())
d = [int(input()) for i in range(N)]
cnt = set(l)
print(len(cnt))

# Fixed code:
N = int(input())
d = [int(input()) for i in range(N)]
cnt = set(d)
print(len(cnt))
# Buggy code:
n=int(input())

d=[]
print('n=',n)
for i in range(n):
    d.append(int(input()))

k=0


for i in range(n-1):
    print('i =',i)
    for j in range(i+1,n):
        if d[i]==d[j]:
            j -= 1
            break
    print('j =',j)
    if j == n-1:
        k += 1
k += 1

print('k =',k)

# Fixed code:
n=int(input())

d=[]

for i in range(n):
    d.append(int(input()))

k=0


for i in range(n-1):

    for j in range(i+1,n):
        if d[i]==d[j]:
            j -= 1
            break

    if j == n-1:
        k += 1
k += 1

print(k)
# Buggy code:

n=int(input())
d = [input() for i in range(n)]

print(d)

print(len(set(d)))


# Fixed code:

n=int(input())
d = [input() for i in range(n)]

print(len(set(d)))
# Buggy code:
N = int(input())
    D = []

    for _ in range(N):
        D.append(int(input()))

    print(len(set(D)))


# Fixed code:
N = int(input())
D = []

for _ in range(N):
  D.append(int(input()))
print(len(set(D)))
# Buggy code:
n = int(input())
dl = []
for _ in range(n):
    dl.append(d)

print(len(set(dl)))

# Fixed code:
n = int(input())
dl = []
for _ in range(n):
    d = int(input())
    dl.append(d)

print(len(set(dl)))
# Buggy code:
n = int(input())
d = [list(input())for i in range(n)]
print(len(set(d)))


# Fixed code:
n  =int(input())
d = [int(input()) for i in range(n)]
print(len(set(d)))
# Buggy code:
n=int(input())
lista=[]
for i in range(n):
    lista.append(int(input()))

lista=set(lista)
print(lista)
print(len(lista))
    

# Fixed code:
n=int(input())
lista=[]
for i in range(n):
    lista.append(int(input()))

lista=set(lista)

print(len(lista))
# Buggy code:
N=int(input("N:"))
a,b=map(int,input().split())
Num=0
num_new=0
Num_sum=0

for number in range(1,N+1):
    for num in str(number):
        num=int(num)
        Num+=num

    if Num>=a and Num<=b:
        Num_sum+=number
    Num=0
print(Num_sum)


# Fixed code:
N,a,b=map(int,input().split())
Num=0
Num_sum=0

for number in range(1,N+1):
    for num in str(number):
        num=int(num)
        Num+=num

    if Num>=a and Num<=b:
        Num_sum+=number
    Num=0
print(Num_sum)
# Buggy code:
N, A, B = map(int, input().split())
print(N, A, B)
ans = 0
for i in range(N+1):
    youso_wa = 0
    a = i
    while True:
        amari = int(a % 10)
        a = int(a / 10)
        youso_wa += amari
        if a == 0:
            break
    if youso_wa >= A and youso_wa <= B:
        ans += i
print(ans)

# Fixed code:
N, A, B = map(int, input().split())
ans = 0
for i in range(N+1):
    youso_wa = 0
    a = i
    while True:
        youso_wa += int(a % 10)
        a = int(a / 10)
        if a == 0:
            break
    if youso_wa >= A and youso_wa <= B:
        ans += i
print(ans)
# Buggy code:
n,a,b = map(int,input().split())
cnt=sum=0

for i in range(1,n+1):
    for j in list(str(i)):sum+=int(j)
    if a <= sum <= b:cnt+=1

print(cnt)


# Fixed code:
n,a,b = map(int,input().split())
res=0

for i in range(1,n+1):
    sum=0
    for j in list(str(i)):sum+=int(j)
    if a <= sum <= b:res+=i

print(res)
# Buggy code:
n,a,b = map(int, input().split())
ans = 0

for i in range(n+1):
    if a <= sum(list(str(i))) <= b:
            ans += i
print(ans)


# Fixed code:
n, a, b = map(int, input().split())
ans = 0
for i in range(n+1):
    num_list = list(map(int, list((str(i)))))
    if a <= sum(num_list) <= b:
        ans += i
print(ans)
# Buggy code:
n,a,b = map(int, input().split())
total = 0
for i in range(1,n+1):
  array = list(map(int,str(i)))
  if a< sum(array) and sum(array)<b :
    sum += i
print(total)

# Fixed code:
n,a,b = map(int, input().split())
total = 0
for i in range(1,n+1):
  array = list(map(int,str(i)))
  if a<= sum(array) and sum(array)<=b :
    total += i
print(total)
# Buggy code:
from sys import stdin
n, a, b = [int(x) for x in stdin.readline().rstrip().split()]
sum = 0

for x in range(1,n+1):
   l = x // 10000
   m = (x % 10000) // 1000
   n = (x % 1000) // 100
   o = (x % 100) // 10
   p = x % 10
   if l+m+n+o+p >= a and l+m+n+o+p <= b:
      sum += x
   print(l,m,n,o,p,sum)

print(sum)

# Fixed code:
from sys import stdin
n, a, b = [int(x) for x in stdin.readline().rstrip().split()]
sum = 0

for x in range(1,n+1):
   l = x // 10000
   m = (x % 10000) // 1000
   n = (x % 1000) // 100
   o = (x % 100) // 10
   p = x % 10
   if l+m+n+o+p >= a and l+m+n+o+p <= b:
      sum += x

print(sum)
# Buggy code:
def sumC(x):
  s = x//10
  s1 = (x-s)//100
  s2 = (x-s-s1*10)//1000
  s3 = (x-s-s1*10-s2*100)//10000
  s4 = (x-s-s1*10-s2*100-s3*1000)//100000
  return(s+s1+s2+s+3+s4)
  
n,a,b = map(int,input().split)
ans = 0
for i in range(1,n+1):
  if a<= sumC(i) <= b:
    ans += i
print(ans) 

# Fixed code:
def sumC(x):
  s = x%10
  s1 = (x-s)/10 %10
  s2 = (x-s-s1*10)/100 %10
  s3 = (x-s-s1*10-s2*100)/1000 %10
  s4 = (x-s-s1*10-s2*100-s3*1000)/10000 %10
  return(int(s+s1+s2+s3+s4))
  
n,a,b = map(int,input().split())
ans = 0
for i in range(1,n+1):
  if a<= sumC(i) <= b:
    ans += i
print(ans)
# Buggy code:
N,A,B=map(int,input().split())
ans = 0
for i in range(1,N+1):
  sum = 0
  while j !=0:
    sum += j % 10
    j = j//10
  if A <= sum <= B:
    ans += i
print(ans)

# Fixed code:
N,A,B=map(int,input().split())
ans = 0
for i in range(1,N+1):
  sum = 0
  j = i
  while j !=0:
    sum += j % 10
    j = j//10
  if A <= sum <= B:
    ans += i
print(ans)
# Buggy code:
N, A, B = map(int, input().split(' '))
sum_digits = 0
for num in range(1, N + 1):
    sum_digit = 0
    tmp = num
    while True:
        if tmp < 10:
            sum_digit += tmp
            break
        digit = tmp % 10
        tmp //= 10
        sum_digit += digit

    if A <= sum_digit <= B:
        sum_digits += num
        print(sum_digit)

print(sum_digits)


# Fixed code:
N, A, B = map(int, input().split(' '))
sum_digits = 0
for num in range(1, N + 1):
    sum_digit = 0
    tmp = num
    while True:
        if tmp < 10:
            sum_digit += tmp
            break
        digit = tmp % 10
        tmp //= 10
        sum_digit += digit

    if A <= sum_digit <= B:
        sum_digits += num

print(sum_digits)
# Buggy code:
n,a,b=map(int, input().split())
ans = 0
for i in range(n):
  d = i
  c = d
  while d >0:
    c += (d%10)
    d = i // 10
  if a <= c <= b:
    ans += 1
print(ans)


# Fixed code:
n,a,b=map(int, input().split())
ans = 0
for i in range(n+1):
  d = i
  c = 0
  while d >0:
    c += (d%10)
    d = d // 10
#  print(i,c)
  if a <= c <= b:
    ans += i
print(ans)
# Buggy code:
N,A,B = map(int,input().split())
K = 0
for i in range(1,N+1):
  if A <= sum(list(map(int,str(i)))) <= B:
    K += 1
print(K)
    



# Fixed code:
N,A,B = map(int,input().split())
K = 0
for i in range(1,N+1):
  if A <= sum(map(int,str(i))) <= B:
    K += i
print(K)
# Buggy code:
n,a,b=map(int,input().split())

def find_sum_of_digits(n):
    sum = 0
    int(n)
    while n > 0:
        sum += n % 10
        n //= 10
    return sum

total = 0
for i in range(1, n+1):
    sum_of_digits_tmp = find_sum_of_digits(i)
    print(sum_of_digits_tmp)
    if a <= sum_of_digits_tmp and sum_of_digits_tmp <= b:
        total += i

# Fixed code:
n,a,b=map(int,input().split())
 
def find_sum_of_digits(n):
    sum = 0
    int(n)
    while n > 0:
        sum += n % 10
        n //= 10
    return sum
 
total = 0
for i in range(1, n+1):
    sum_of_digits_tmp = find_sum_of_digits(i)
    if a <= sum_of_digits_tmp and sum_of_digits_tmp <= b:
        total += i
 
print(total)
# Buggy code:
n, a, b = map(int, input().split())
res = 0
for i in range(a, n+1):
  s = str(i)
  sum = 0
  for j in s:
    sum += int(s)
  if a <= sum <= b:
    res += sum
print(res)

# Fixed code:
n, a, b = map(int, input().split())
s = str(n)
selected = 0
for i in range(1,n+1):
    sum = 0
    for j in str(i):
        sum += int(j)
    if a <= sum <= b:
        selected += i
print(selected)
# Buggy code:
N,A,B = map(int, input().split())
ret = 0
for i in range(N):
  c = sum([int(c) for c in str(i)])
  if A <= c and c <= B:
    ret += 1
print(ret)


# Fixed code:
N,A,B = map(int, input().split())
ret = 0
for i in range(N+1):
  s = sum([int(c) for c in str(i)])
  if A <= s and s <= B:
    ret += i
print(ret)
# Buggy code:
n, a, b = map(int, input().split())
ans = 0
for i in range(n+1):
    m = 0
    while i != 0:
        m += int(n % 10)
        i = i / 10
    if a <= m <= b:
        ans += m
print(ans)


# Fixed code:
n, a, b = map(int, input().split())
ans = 0
for i in range(n+1):
    m = 0
    i0 = i
    while i != 0:
        m += int(i % 10)
        i = int(i / 10)
    if a <= m <= b:
        ans += i0
print(ans)
# Buggy code:
def main():
    num = list(map(int, input().split()))
    total_sum = 0
    print(num[0])
    for i in range(1,num[0]+1):
        current = i
        current_sum=0
        while i >= 1:
            current_sum += i %10
            i /=10
        if ((current_sum >= num[1]) and (current_sum <= num[2])):
            total_sum += current
    print(total_sum)
main()

# Fixed code:
def main():
    num = list(map(int, input().split()))
    total_sum = 0
    for i in range(1,num[0]+1):
        current = i
        current_sum=0
        while i >=1:
            current_sum += int( i %10)
            i = i//10
        if ((current_sum >= num[1]) and (current_sum <= num[2])):
            total_sum += current
    print(total_sum)
main()
# Buggy code:
n, a, b = map(int,input().split(' '))
total = 0
for num in range(1,n+1):
    split_nums = [int(s) for s in list(str(num))]
    sum = 0
    for s in split_nums:
        sum += s
    if a <= sum and sum <= b:
        print(split_nums, sum)
        total += num
print(total)

# Fixed code:
n, a, b = map(int,input().split(' '))
total = 0
for num in range(1,n+1):
    split_nums = [int(s) for s in list(str(num))]
    sum = 0
    for s in split_nums:
        sum += s
    if a <= sum and sum <= b:
        total += num
print(total)
# Buggy code:
n,a,b=map(int,input().split())
sum=0
for i in range(n):
     wa = int(i//1000) + int(i//100) + int((i / 10) % 10)  + int(i % 10)
     if a <= wa and wa<=b:
         sum += i
         print(wa)
print(sum)

# Fixed code:
n,a,b=map(int,input().split())
sum=0
for i in range(n+1):
     wa = int((i / 10000) % 10)+int((i / 1000) % 10) + int((i / 100) % 10) + int((i / 10) % 10)  + int(i % 10)
     if a <= wa and wa<=b:
         sum += i
print(sum)
# Buggy code:
n, a, b = map(int, input().split())

ans = 0
for x in range(1,n+1):
    print('x=='+str(x))
    sum = 0
    y = x
    while x > 0:
        sum += x%10
        x = int(x/10)
    if a<= sum <= b: 
        print(a)
        ans += y
print(ans)

# Fixed code:
n, a, b = map(int, input().split())

ans = 0
for x in range(1,n+1):
    sum = 0
    y = x
    while x > 0:
        sum += x%10
        x = int(x/10)
    if a<= sum <= b: 
        ans += y
print(ans)
# Buggy code:
N,A,B = map(int,input().split())

output = 0
digitsum = 0

for i in range(N): 
  # set condition for i < 10^4
  if i < 10:
	digitsum = i//10 + i%10
  elif i<100:
    digitsum = i//10+i%10
  elif i<1000:
    digitsum = i//100+(i%100)//10+(i%100)%10
  elif i<10000:
    digitsum= i//1000+(i%1000)//100+((i%1000)%100)//10+((i%1000)%100)%10
  else:
    digitsum = 0

  if A <= digitsum and digitsum <= B:
  	output += i
    
print (output)



# Fixed code:
N, A, B = map(int, input().split())
output = 0
for i in range(1, N + 1):
    # set each condition for i < 10^4
    if i < 10:
        digitsum = i
    elif i < 100:
        digitsum = i // 10 + i % 10
    elif i < 1000:
        digitsum = i // 100 + (i % 100) // 10 + (i % 100) % 10
    elif i < 10000:
        digitsum = i // 1000 + (i % 1000) // 100 + ((i % 1000) % 100) // 10 + ((i % 1000) % 100) % 10
    else:
        digitsum = 1

    if A <= digitsum and digitsum <= B:
        output = output +  i

print (output)
# Buggy code:
n,a,b = map(int, input().split())
ans = 0

def sum(k):
  s = 0
  for j in range(len(s)):
    s+=int(k[j])
  return s

for i in range(1,n+1):
  if a<=sum(str(i))<=b:
    ans+=i
print(ans)

# Fixed code:
n,a,b = map(int, input().split())
ans = 0

def sum(k):
  s = 0
  for j in range(len(k)):
    s+=int(k[j])
  return s

for i in range(1,n+1):
  if a<=sum(str(i))<=b:
    ans+=i
print(ans)
# Buggy code:
N,A,B = list(map(int,input().split()))

cnt = 0
for n range(1,N):
    val = 0
    tmp = N
    while tmp // N > 0:
        val = tmp % 10
        tmp = tmp // 10
    
    if val >= A and val <= B:
        cnt += 1
print(cnt)

# Fixed code:
N,A,B = list(map(int,input().split()))

cnt = 0
for n in range(1,N+1):
    val = n % 10
    tmp = n
    while tmp // 10 > 0:
        
        tmp = tmp // 10
        val += tmp % 10
    if val >= A and val <= B:
        cnt += n
print(cnt)
# Buggy code:
N,A,B = map(int,input().split())
ans = 0
for i in range(int(N)+1):
    array = list(map(int,list(str(i))))
    print(array)
    if(sum(array)>=A and sum(array)<=B):
        ans += int(i)
print(ans)


# Fixed code:
N,A,B = map(int,input().split())
ans = 0
for i in range(int(N)+1):
    array = list(map(int,list(str(i))))
    if(sum(array)>=A and sum(array)<=B):
        ans += int(i)
print(ans)
# Buggy code:
# -*- coding: utf-8 -*-
# Some Sums


def calcSumOfDigits(n):
    sum = 0
    while n > 0:
        sum += n % 10
        n /= 10
    return sum

a = list(map(int, input().split()))
N = a[0]
A = a[1]
B = a[2]

total = 0
for i in range(N):
    sumOfDigits = calcSumOfDigits(i+1)
    if sumOfDigits >= A and sumOfDigits <= B:
        total += sumOfDigits
print(total)

# Fixed code:
# -*- coding: utf-8 -*-
# Some Sums


def calcSumOfDigits(n):
    sum = 0
    while n > 0:
        sum += n % 10
        # print(sum)
        n = n // 10
    return sum

a = list(map(int, input().split()))
N = a[0]
A = a[1]
B = a[2]

total = 0
for i in range(N):
    sumOfDigits = calcSumOfDigits(i+1)
    # print("sumOfDigits: ", sumOfDigits)
    if sumOfDigits >= A and sumOfDigits <= B:
        # print("N: ", i+1)
        total += i+1
# print("total: ", total)
print(total)
# Buggy code:
s=list(map(int,input().split()))

oklist=[]

def keta(x):
    ketalist=[]
    for j in range(len(x)):
        ketalist.append(int(x[j]))
    return(sum(ketalist))
        
    

for i in range(s[0]+1):
    check=keta(str(i))
    if(s[1]<=check and check<=s[2]):
        oklist.append(i)
        print('ok')       
sum_=sum(oklist)


# Fixed code:
s=list(map(int,input().split()))

oklist=[]

def keta(x):
    ketalist=[]
    for j in range(len(x)):
        ketalist.append(int(x[j]))
    return(sum(ketalist))
        
    

for i in range(s[0]+1):
    check=keta(str(i))
    if(s[1]<=check and check<=s[2]):
        oklist.append(i)     
sum_=sum(oklist)
print(sum_)
# Buggy code:
import sys
def main():
    input = sys.stdin.readline
    N, A, B = map(int,input.split())
    #print('N:%d A:%d B: %d' % (N,A,B)) 

    answer = []
    for i in range(N+1):
        s = sum( map(int,list(str(i)) )) # list of int -> sum
        if s >= A and s <= B: answer.append(i)
        #print('i:%d s:%d' % (i,s))
    print(sum(answer))

if __name__ == "__main__":
    main()

# Fixed code:
def main():
    N, A, B = map(int,input().split())
    #print('N:%d A:%d B: %d' % (N,A,B)) 

    answer = []
    for i in range(N+1):
        s = sum( map(int,list(str(i)) )) # list of int -> sum
        if s >= A and s <= B: answer.append(i)
        #print('i:%d s:%d' % (i,s))
    print(sum(answer))

if __name__ == "__main__":
    main()
# Buggy code:
n,a,b = map(int,input().split())
ans = 0
for i in range(1,n+1):
    s = 0
    for t in str(i):
        s　 += int(t)
    if a-1< s < b+1:
        ans += str(i)
print(ans)

# Fixed code:
n,a,b = map(int,input().split())
ans = 0
for i in range(1,n+1):
    s = 0
    for t in str(i):
        s += int(t)
    if a-1< s < b+1:
        ans += i
print(ans)
# Buggy code:
n, a, b = map(int,input().split())

ans = 0
for x in range(n+1):
    x_1 = x
    x_2 = x//10 + x%10
    x_3 = x//100 + x//10 + x%10
    x_4 = x//1000 + x//100 + x//10 + x%10
    x_5 = x//10000 + x//1000 + x//100 + x//10 + x%10
    if a<=x_1 and x_1<=b and x<10:
       ans += x
    elif a<=x_1 and x_2<=b and 10<x<100:
       ans += x
    elif a<=x_1 and x_3<=b and 100<x<1000:
       ans += x
    elif a<=x_1 and x_4<=b and 1000<x<10000:
       ans += x
    elif a<=x_1 and x_5<=b and 10000<x<100000:
       ans += x

print(ans)


# Fixed code:
n, a, b = map(int,input().split())

ans = 0
for x in range(n+1):
    x_1 = x%10
    x_2 = (x%100)//10 + x_1
    x_3 = (x%1000)//100 + x_2
    x_4 = (x%10000)//1000 + x_3
    x_5 = (x%100000)//10000 + x_4
    if a<=x_1 and x_1<=b and x<10:
       ans += x
    if a<=x_2 and x_2<=b and 10<=x and x<100:
       ans += x
    if a<=x_3 and x_3<=b and 100<=x and x<1000:
       ans += x
    if a<=x_4 and x_4<=b and 1000<=x and x<10000:
       ans += x
    if a<=x_5 and x_5<=b and 10000<=x and x<=100000:
       ans += x

print(ans)
# Buggy code:
n,a,b  = map(int,input().split())
ans = 0
for i in range(1,n+1):
  d = i
  s=0
  while d:
    r = d %10
    d = int(d/10)
    s+=r
  if a<=s<=b:
    ans += 1
print(ans)

# Fixed code:
n,a,b  = map(int,input().split())
ans = 0
for i in range(1,n+1):
  d = i
  s = 0
  while d:
    s +=  d % 10
    d = int(d/10)
  if a<=s<=b:
    ans += i
print(ans)
# Buggy code:
n,a,b = map(int,input().split())
s = 0
for i in range(n):
  if 2 <= sum(map(int, [_ for _ in str(i)])) <= 5:
    s += i
print(s)

# Fixed code:
n,a,b = map(int,input().split())
s = 0
for i in range(n+1):
  if a <= sum(map(int, [_ for _ in str(i)])) <= b:
    s += i
print(s)
# Buggy code:
x,y = map(int,input().split())
cnt = 0
while(x <= y):
    x = x * pow(2,cnt)
    cnt += 1
print(cnt)

# Fixed code:
x,y=map(int,input().split())
a=x
cnt=0
while a<=y:
    a*=2
    cnt+=1
print(cnt)
# Buggy code:
x,y = map(int,input().split())
while x <= y:
    ans += 1
    x *= 2
print(ans)

# Fixed code:
x,y = map(int, input().split())
ans = 0
while x<=y:
    x*=2
    ans+=1
print(ans)
# Buggy code:
x,y=map(int, input().split())
ans=1
while x<y:
    x=x*2
    ans+=1
print(ans)

# Fixed code:
x,y=map(int,input().split())
ans=0
while x<=y:
    if x<=y:
        ans+=1
    x*=2
print(ans)
# Buggy code:
X, Y = map(int, input().split())
ans = 0
while X < Y:
    X *= 2
    ans += 1
print(ans)

# Fixed code:
X,Y = map(int,input().split())
ans = 0
while Y>=X:
  ans += 1
  X*=2
print(ans)
# Buggy code:
X, Y = list(map(int, (input().split())))

num = X
counter = 0

if num == 1:
    counter += 1
    num += 1

for i in range (1, Y):
    if num >= Y:
        print(num,counter)
        break

    else:
        print(num)
        counter += 1
        num *= 2

print(counter)

# Fixed code:
X, Y = list(map(int, (input().split())))

num = X
counter = 0

if num == 1:
    counter += 1
    num += 1

for i in range (1, Y):
    if num > Y:
        break

    else:
        counter += 1
        num *= 2

print(counter)
# Buggy code:
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 24 21:42:42 2019

@author: Owner
"""


X, Y = list(map(int, input().split()))
cnt = 0
for n in range(Y):
    if X*2**n >=Y:
        cnt = n
        break
    else:
        pass

print(cnt)

# Fixed code:
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 24 21:42:42 2019

@author: Owner
"""


X, Y = list(map(int, input().split()))
cnt = 0
for n in range(Y):
    if X*2**n ==Y:
        cnt = n +1
        break
    elif X*2**n >Y:
        cnt = n
        break
    else:
        pass

print(cnt)
# Buggy code:
X, Y = map(int, input().split())
a, b = 0, 0
while True:
    X = X//2
    if X < 2:
        break
    a += 1
while True:
    Y = Y//2
    if Y < 2:
        break
    b += 1
print(b-a+1)


# Fixed code:
X, Y = map(int, input().split())
b = 0
while True:
    Y = Y//2
    if Y < X:
        b += 1
        break
    b += 1
print(b)
# Buggy code:
x, y = map(int, input().split())

ans = 0

while x < y:
    x *= 2
    ans += 1
print(ans)


# Fixed code:
x,y = map(int, input().split())

ans = 0

s = x

while s<=y:
    ans += 1
    s *=2

print(ans)
# Buggy code:
x,y=map(int,input().split())
len=1
while True:
  x*=2
  if x*2<y:
    len+=1
  else:
    break
print(len)

# Fixed code:
x,y=map(int,input().split())
len=1
while True:
  if x*2<=y:
    len+=1
  else:
    break
  x*=2
print(len)
# Buggy code:
a = input().split()
ans=1
b=0
c=[int(a[0])]
while(0==0):
    if c[b]*2<int(a[1])-1:
        c.append(c[b]*2)
        b+=1
    else:
        print(len(c))
        break

# Fixed code:
a = input().split()
b=0
c=[int(a[0])]
while(0==0):
    if c[b]*2<=int(a[1]):
        c.append(c[b]*2)
        b+=1
    else:
        print(len(c))
        break
# Buggy code:
X, Y = map(int,input().split())

i = 1
while X < Y:
  X * 2
  i += 1
  
 print(i)

# Fixed code:
X, Y = map(int, input().split())
i = 1
while X*(2**i) <= Y:
  i+=1
print(i)