For a positive integer n, let f(n) be the sum of squares of its digits in the decimal notation. Given are three integers k,a,b. Your task is to determine the number of such natural numbers n, that a≤n≤b and n is the solution of the equation \[ k\cdot f(n) = n. \]
The first and only line of the input contains three integers of the task statement: k,a,b, (1≤k,a,b≤1018, a≤b).
Your program should output a single integer: the number of integral solutions of the given equation contained in the range \[a,b].
In the example, the only positive integers n from the range \[5000,10000] satisfying the equation for k=51 are 7293, 7854 and 7905.