void main()
{
    int[] tmp = readln.split.to!(int[]);
    int month = tmp[0], day = tmp[1];

    int cnt;
    foreach (m; 2 .. month+1)
    {
        foreach (d; 21 .. day+1)
        {
            int div = d / 10, rem = d % 10;
            if (rem >= 2 && m == div * rem)
            {
                ++cnt;
            }
        }
    }

    cnt.writeln;
}

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