M, D = list(map(int, input().split()))



ans = 0

for m in range(1, M+1):

    for d in range(20, D + 1):

        a, b = list(map(int, str(d)))

        if b < 2:

            continue

        elif m == a*b:

            ans += 1





print(ans)

import sys

input = sys.stdin.readline

sys.setrecursionlimit(10**7)



M, D = list(map(int, input().split()))



ans = 0



for d in range(20, D + 1):

    for m in range(1, M+1):

        a, b = d//10, d % 10

        if m == a*b and b >= 2:

            ans += 1





print(ans)

M, D = list(map(int, input().split()))
ans = 0
for m in range(1, M + 1):
    for d in range(20, D + 1):
        a, b = list(map(int, str(d)))
        if b < 2:
            continue
        elif m == a * b:
            ans += 1
print(ans)

import sys

input = sys.stdin.readline
sys.setrecursionlimit(10**7)
M, D = list(map(int, input().split()))
ans = 0
for d in range(20, D + 1):
    for m in range(1, M + 1):
        a, b = d // 10, d % 10
        if m == a * b and b >= 2:
            ans += 1
print(ans)

+import sys + +input = sys.stdin.readline +sys.setrecursionlimit(10**7) -for m in range(1, M + 1): -    for d in range(20, D + 1): -        a, b = list(map(int, str(d))) -        if b < 2: -            continue -        elif m == a * b: +for d in range(20, D + 1): +    for m in range(1, M + 1): +        a, b = d // 10, d % 10 +        if m == a * b and b >= 2: