fun main(args:Array<String>){
    val(m,d)= readLine()!!.split(" ").map{
        it.toInt()
    }
    if(d<22){
        println(0)
    }
    else{
        var ans=0
        for(i in 1..m){
            for(j in 1..d){
                val s=j.toString()
                if(s.length>1){
                    val a=s[0].toString().toInt()
                    val b=s[1].toString().toInt()
                    if(a>=2&&b>=2&&i==a*b){
                        ans++
                    }
                }
            }
        }
        println(ans)
    }
}
