import std.stdio;
import std.algorithm;
import std.math;
import std.conv;
import std.string;

T readNum(T)(){
  return readStr.to!T;
}

T[] readNums(T)(){
  return readStr.split.to!(T[]);
}

string readStr(){
  return readln.chomp;
}

void main(){
  auto md = readNums!int;

  int ret;
  foreach(m; 1 .. md[0]+1){
    foreach(d; 1 .. md[1]+1){
      if(d % 10 >= 2 && d / 10 >= 2 && (d % 10) * (d / 10) == m){
        ret++;
      }
    }
  }

  writeln(ret);
}
