import Control.Monad.State
import Control.Arrow

getInts = map read . words <$> getLine :: IO [Int]

data Coins = Coins {_a::Int,_b::Int,_c::Int}

sumStr = map (\x -> read [x]) >>> foldr1 (+)

main = do
    (n:a:b:_) <- getInts
    putStrLn . show $ take n >>> filter (show >>> sumStr >>> between a b) >>> foldr1 (+) $ [1..]
    where between a b x =  a <= x && x <= b
