integer M
integer D
integer D10,D1
integer ans
read*,M,D
D10=D/10
D1=mod(D,10)

ans=0
do i=2,D10-1
  do j=2,9
    if(i*j<=M)ans=ans+1
  end do
end do
do j=2,D1
  if(D10*j<=M)ans=ans+1
end do
print"(i0)",ans
end