Module Module1

    Sub Main()
        'let'
        Dim tmp() As String = Console.ReadLine().Split()
        Dim N As Long = tmp(0)
        Dim A As Long = tmp(1)
        Dim B As Long = tmp(2)

        'var'
        Dim cnt As Long = 0

        For i As Long = 1 To N
            'let'
            Dim str As String = Convert.ToString(i)
            'var'
            Dim j As Long = 0

            For Each c As Char In str
                j += CLng(c & "")
            Next

            If A <= j AndAlso j <= B Then
                cnt += i
            End If
        Next

        Console.WriteLine(cnt)

    End Sub

End Module