ary = []
ary = gets.split(' ').map(&:to_i)
m = ary[0]
d = ary[1]

result = 0
1.upto(m) { |m_num|
  1.upto(d) { |d_num|
    d_s = d_num.to_s.split('').map(&:to_i)
    if d_s.length == 1
        next
    end 
    if d_s[0] < 2 || d_s[1] < 2
        next
end
    if d_s[0] * d_s[1] == m_num
      result += 1
    end

  }
}
 
puts result