import std.algorithm;
import std.array;
import std.container;
import std.conv;
import std.math;
import std.numeric;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void scan(T...)(ref T a) {
    string[] ss = readln.split;
    foreach (i, t; T) a[i] = ss[i].to!t;
}
T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

int calc(int m, int d) {
    int ans = 0;
    for (int i = 1; i <= m; i++) {
        for (int j = 1; j <= d; j++) {
            int d1 = j % 10;
            int d10 = j / 10;
            if (d1 >= 2 && d10 >= 2 && i == d1 * d10) {
                ans++;
            }
        }
    }
    return ans;
}

void main() {
    int m, d; scan(m, d);
    writeln(calc(m, d));
}
