main = do
  [n,a,b] <- map read . words <$> getLine
  print . sum $ [n' | n' <- [1..n], a <= (sumDigit n') && (sumDigit n') <= b]

sumDigit :: Int -> Int
sumDigit 0 = 0
sumDigit n = sumDigit (n `div` 10) + n `mod` 10
