import std.stdio, std.math, std.algorithm, std.array, std.string, std.conv, std.container, std.range;
pragma(inline, true) T[] Reads(T)() { return readln.split.to!(T[]); }
alias reads = Reads!int;
pragma(inline, true) void scan(Args...)(ref Args args) {
    string[] ss = readln.split;
    foreach (i, ref arg ; args) arg = ss[i].parse!int;
}

void main() {
    int m, d; scan(m,d);
    int ans;
    foreach (i; 1..m+1) {
        foreach (j; 1..d+1) {
            int d1 = j%10, d2 = (j/10) % 10;
            if (d1>=2 && d2>=2 && d1*d2 == i) ans++;
        }
    }
    writeln(ans);
}
