#!/usr/bin/env js91
"use strict";
function Func(num, max) {
const base = 1 + Math.floor(num / 10) * 10;
return [...Array(9).keys()]
.map(i => i + base)
.filter((x) => x * (x % 10) <= max)
.length;
}
function main(args) {
console.log(`N = ${Func(args[0], args[1])}`);
}
main(scriptArgs);
IyEvdXNyL2Jpbi9lbnYganM5MQoKInVzZSBzdHJpY3QiOwoKZnVuY3Rpb24gRnVuYyhudW0sIG1heCkgewogIGNvbnN0IGJhc2UgPSAxICsgTWF0aC5mbG9vcihudW0gLyAxMCkgKiAxMDsKICByZXR1cm4gWy4uLkFycmF5KDkpLmtleXMoKV0KICAubWFwKGkgPT4gaSArIGJhc2UpCiAgLmZpbHRlcigoeCkgPT4geCAqICh4ICUgMTApIDw9IG1heCkKICAubGVuZ3RoOwp9CgpmdW5jdGlvbiBtYWluKGFyZ3MpIHsKICBjb25zb2xlLmxvZyhgTiA9ICR7RnVuYyhhcmdzWzBdLCBhcmdzWzFdKX1gKTsKfQoKbWFpbihzY3JpcHRBcmdzKTs=