Malek lives in an apartment block with 100 floors numbered from 0 to 99. The apartment has an elevator with a digital counter showing the floor that the elevator is currently on. The elevator shows each digit of a number with 7 light sticks by turning them on or off. The picture below shows how the elevator shows each digit.[Image]

One day when Malek wanted to go from floor 88 to floor 0 using the elevator he noticed that the counter shows number 89 instead of 88. Then when the elevator started moving the number on the counter changed to 87. After a little thinking Malek came to the conclusion that there is only one explanation for this: One of the sticks of the counter was broken. Later that day Malek was thinking about the broken stick and suddenly he came up with the following problem.

Suppose the digital counter is showing number n. Malek calls an integer x (0 ≤ x ≤ 99) good if it's possible that the digital counter was supposed to show x but because of some(possibly none) broken sticks it's showing n instead. Malek wants to know number of good integers for a specific n. So you must write a program that calculates this number. Please note that the counter always shows two digits.


-----Input-----

The only line of input contains exactly two digits representing number n (0 ≤ n ≤ 99). Note that n may have a leading zero.


-----Output-----

In the only line of the output print the number of good integers.


-----Examples-----
Input
89

Output
2

Input
00

Output
4

Input
73

Output
15



-----Note-----

In the first sample the counter may be supposed to show 88 or 89.

In the second sample the good integers are 00, 08, 80 and 88.

In the third sample the good integers are 03, 08, 09, 33, 38, 39, 73, 78, 79, 83, 88, 89, 93, 98, 99.

Difficulty: EASY

Solutions:
poss = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
n = input()
p = 1
for d in n:
	p *= poss[int(d)]
print(p)


x = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
s = input()
print(x[int(s[0])] * x[int(s[1])])


a = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
l = int(input())
r = int(l % 10)
l = int(l / 10)
print(a[l] * a[r])


gd = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
n = int(input())
print(gd[n // 10] * gd[n % 10])


digit = {'1': [8], '2': [0, 2, 6, 9], '3': [3, 4], '4': [5], '5': [7], '7': [1]}
n = input()
(out, c) = (1, 2)
for (i, j) in digit.items():
	if int(n[0]) in j:
		out *= int(i)
		c -= 1
	if int(n[1]) in j:
		out *= int(i)
		c -= 1
	if c == 0:
		exit(print(out))


(n, a) = (input(), [2, 7, 2, 3, 3, 4, 2, 5, 1, 2])
print(a[int(n[0])] * a[int(n[1])])


m = {0: 2, 1: 7, 2: 2, 3: 3, 4: 3, 5: 4, 6: 2, 7: 5, 8: 1, 9: 2}
(h, l) = divmod(int(input()), 10)
print(m[h] * m[l])


digit = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
n = int(input())
print(digit[n // 10] * digit[n % 10])


d = dict()
d['0'] = [0, 8]
d['1'] = [0, 1, 3, 4, 7, 8, 9]
d['2'] = [2, 8]
d['3'] = [3, 8, 9]
d['4'] = [4, 8, 9]
d['5'] = [5, 6, 8, 9]
d['6'] = [6, 8]
d['7'] = [0, 3, 7, 8, 9]
d['8'] = [8]
d['9'] = [8, 9]
s = input()
res = 1
for j in [len(d[i]) for i in s]:
	res *= j
print(res)


a = list(map(int, list(input())))
d = {0: {1, 2, 3, 5, 6, 7}, 1: {3, 6}, 2: {2, 3, 4, 5, 7}, 3: {2, 3, 4, 6, 7}, 4: {1, 4, 3, 6}, 5: {2, 1, 4, 6, 7}, 6: {2, 1, 4, 5, 6, 7}, 7: {2, 3, 6}, 8: {1, 2, 3, 4, 5, 6, 7}, 9: {1, 2, 3, 4, 6, 7}}
a0 = []
a1 = []
for y in d:
	if d[a[0]].issubset(d[y]):
		a0.append(y)
	if d[a[1]].issubset(d[y]):
		a1.append(y)
print(len(a0) * len(a1))


import time
dic = {'0': 2, '1': 7, '2': 2, '3': 3, '4': 3, '5': 4, '6': 2, '7': 5, '8': 1, '9': 2}
n = input()
start = time.time()
ans = dic[n[0]] * dic[n[1]]
print(ans)
finish = time.time()


list = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
n = int(input())
print(list[n // 10] * list[n % 10])


allpossibilities = (2, 7, 2, 3, 3, 4, 2, 5, 1, 2)
valueofn = input()
solution = 1
for digit in valueofn:
	solution *= allpossibilities[int(digit)]
print(solution)


S = input()
k = 0
for i in range(2):
	if i == 0:
		if S[i] == '0':
			k = k + 2
		if S[i] == '1':
			k = k + 7
		if S[i] == '2':
			k = 2
		if S[i] == '3':
			k = 3
		if S[i] == '4':
			k = 3
		if S[i] == '5':
			k = 4
		if S[i] == '6':
			k = 2
		if S[i] == '7':
			k = 5
		if S[i] == '8':
			k = 1
		if S[i] == '9':
			k = 2
	else:
		if S[i] == '0':
			k = k * 2
		if S[i] == '1':
			k = k * 7
		if S[i] == '2':
			k = k * 2
		if S[i] == '3':
			k = k * 3
		if S[i] == '4':
			k = k * 3
		if S[i] == '5':
			k = k * 4
		if S[i] == '6':
			k = k * 2
		if S[i] == '7':
			k = k * 5
		if S[i] == '8':
			k = k * 1
		if S[i] == '9':
			k = k * 2
print(k)


possib = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
s = input()
print(possib[int(s[0])] * possib[int(s[1])])


numbers = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
n = int(input())
print(numbers[n // 10] * numbers[n % 10])


arr = [[0, 8], [0, 1, 3, 4, 7, 8, 9], [2, 8], [3, 8, 9], [4, 8, 9], [5, 6, 8, 9], [6, 8], [0, 3, 7, 8, 9], [8], [8, 9]]
s = input()
print(len(arr[int(s[0])]) * len(arr[int(s[1])]))


l = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
s = input()
print(l[int(s[0])] * l[int(s[1])])


d = {'0': 2, '1': 7, '2': 2, '3': 3, '4': 3, '5': 4, '6': 2, '7': 5, '8': 1, '9': 2}
s = input()
print(d[s[0]] * d[s[1]])


m = [[0, 8], [0, 1, 3, 4, 7, 8, 9], [2, 8], [3, 9, 8], [4, 9, 8], [5, 9, 8, 6], [6, 8], [7, 0, 3, 8, 9], [8], [8, 9]]
n = int(input())
print(len(m[n % 10]) * len(m[n // 10]))


def indicate(m):
	a = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
	return a[m // 10] * a[m % 10]
print(indicate(int(input())))


Dict = {}
Dict[0] = 2
Dict[1] = 7
Dict[2] = 2
Dict[3] = 3
Dict[4] = 3
Dict[5] = 4
Dict[6] = 2
Dict[7] = 5
Dict[8] = 1
Dict[9] = 2
s = [i for i in input()]
x = int(s[0])
y = int(s[1])
print(Dict[x] * Dict[y])


n = input()
dic = {'0': 2, '1': 7, '2': 2, '3': 3, '4': 3, '5': 4, '6': 2, '7': 5, '8': 1, '9': 2}
print(dic[n[0]] * dic[n[1]])


x = int(input())
ones = int(x % 10)
tens = int(x / 10)

def get_num(y):
	if y == 0 or y == 9 or y == 6 or (y == 2):
		return 2
	elif y == 1:
		return 7
	elif y == 3 or y == 4:
		return 3
	elif y == 5:
		return 4
	elif y == 7:
		return 5
	elif y == 8:
		return 1
print(get_num(ones) * get_num(tens))


d = {}
d[0] = 2
d[1] = 7
d[2] = 2
d[3] = 3
d[4] = 3
d[5] = 4
d[6] = 2
d[7] = 5
d[8] = 1
d[9] = 2
n = str(input())
c = 1
for i in n:
	c = c * d[int(i)]
print(c)


__author__ = 'Rakshak.R.Hegde'
design = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
(n1, n2) = map(int, input())
count = design[n1] * design[n2]
print(count)


z = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
c = list(map(int, input()))
print(z[c[0]] * z[c[1]])


n = int(input())
a = list(range(10))
a[0] = 2
a[1] = 7
a[2] = 2
a[3] = 3
a[4] = 3
a[5] = 4
a[6] = 2
a[7] = 5
a[8] = 1
a[9] = 2
n1 = (n - n % 10) // 10
n2 = n % 10
print(a[n1] * a[n2])
0


n = int(input())
d1 = n // 10
d2 = n % 10

def c(k):
	if k == 0:
		return 2
	if k == 1:
		return 7
	if k == 2:
		return 2
	if k == 3:
		return 3
	if k == 4:
		return 3
	if k == 5:
		return 4
	if k == 6:
		return 2
	if k == 7:
		return 5
	if k == 8:
		return 1
	if k == 9:
		return 2
print(c(d1) * c(d2))


d = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
n = input()
print(d[int(n[0])] * d[int(n[1])])


IL = lambda : list(map(int, input().split()))
IS = lambda : input().split()
I = lambda : int(input())
S = lambda : input()
dmap = {0: 2, 1: 7, 2: 2, 3: 3, 4: 3, 5: 4, 6: 2, 7: 5, 8: 1, 9: 2}
digits = S()
print(dmap[int(digits[0])] * dmap[int(digits[1])])


n = input()
l = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
print(l[int(n[0])] * l[int(n[1])])


n = input().strip()
l = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
k = 1
for i in range(2):
	k = k * l[int(n[i])]
print(k)


from sys import stdin

def nb_good_numbers(n):
	by_digit = {'0': 2, '1': 7, '2': 2, '3': 3, '4': 3, '5': 4, '6': 2, '7': 5, '8': 1, '9': 2}
	result = 1
	for digit in n:
		result *= by_digit[digit]
	return result
n = stdin.readline().rstrip()
print(nb_good_numbers(n))


new_s = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
ans = 1
n = list(input())
for x in n:
	ans *= new_s[int(x)]
print(ans)


ways = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
a = input()
print(ways[ord(a[0]) - ord('0')] * ways[ord(a[1]) - ord('0')])


def ans(a):
	if a == 0:
		return 2
	if a == 1:
		return 7
	if a == 2:
		return 2
	if a == 3:
		return 3
	if a == 4:
		return 3
	if a == 5:
		return 4
	if a == 6:
		return 2
	if a == 7:
		return 5
	if a == 8:
		return 1
	if a == 9:
		return 2
n = list(map(int, input()))
print(ans(n[0]) * ans(n[1]))


def main():
	m = ((1, 1, 1, 0, 1, 1, 1), (0, 0, 1, 0, 0, 1, 0), (1, 0, 1, 1, 1, 0, 1), (1, 0, 1, 1, 0, 1, 1), (0, 1, 1, 1, 0, 1, 0), (1, 1, 0, 1, 0, 1, 1), (1, 1, 0, 1, 1, 1, 1), (1, 0, 1, 0, 0, 1, 0), (1, 1, 1, 1, 1, 1, 1), (1, 1, 1, 1, 0, 1, 1))
	(u, v) = list(map(int, input()))
	tot = 0
	for i in range(100):
		(x, y) = divmod(i, 10)
		diff = 0
		for (aa, bb) in ((u, x), (v, y)):
			for (a, b) in zip(m[aa], m[bb]):
				if a > b:
					diff = 100
					break
				diff += a < b
		if diff < 100:
			tot += 1
	print(tot)

def __starting_point():
	main()
__starting_point()


data = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
str_input = input()
print(data[int(str_input[0])] * data[int(str_input[1])])


n = input()
l1 = 1
for i in n:
	if i == '0':
		l1 = l1 * 2
	elif i == '1':
		l1 = l1 * 7
	elif i == '2':
		l1 = l1 * 2
	elif i == '3':
		l1 = l1 * 3
	elif i == '4':
		l1 = l1 * 3
	elif i == '5':
		l1 = l1 * 4
	elif i == '6':
		l1 = l1 * 2
	elif i == '7':
		l1 = l1 * 5
	elif i == '8':
		l1 = l1 * 1
	elif i == '9':
		l1 = l1 * 2
print(l1)


def seg_n(n):
	n = int(n)
	if n == 9:
		return 2
	elif n == 8:
		return 1
	elif n == 7:
		return 5
	elif n == 6:
		return 2
	elif n == 5:
		return 4
	elif n == 4:
		return 3
	elif n == 3:
		return 3
	elif n == 2:
		return 2
	elif n == 1:
		return 7
	else:
		return 2
n = input()
summ = 1
f = seg_n(n[0])
z = seg_n(n[1])
print(f * z)


sticks = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
x = input()
a = 1
for i in x:
	a *= sticks[ord(i) - ord('0')]
print(a)


n = input()
a = [0] * 10
a[0] = 2
a[1] = 7
a[2] = 2
a[3] = 3
a[4] = 3
a[5] = 4
a[6] = 2
a[7] = 5
a[8] = 1
a[9] = 2
print(a[int(n[0])] * a[int(n[1])])


s = {0: [0, 8], 1: [0, 1, 3, 4, 7, 8, 9], 2: [2, 8], 3: [3, 8, 9], 4: [4, 8, 9], 5: [5, 6, 8, 9], 6: [6, 8], 7: [0, 3, 7, 8, 9], 8: [8], 9: [9, 8]}
n = list(input())
ans = 1
for x in n:
	ans *= len(s[int(x)])
print(ans)


n = int(input())
arr = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
print(arr[n // 10] * arr[n % 10])


inp = input()
if inp[0] == '0':
	a = 2
if inp[0] == '1':
	a = 7
if inp[0] == '2':
	a = 2
if inp[0] == '3':
	a = 3
if inp[0] == '4':
	a = 3
if inp[0] == '5':
	a = 4
if inp[0] == '6':
	a = 2
if inp[0] == '7':
	a = 5
if inp[0] == '8':
	a = 1
if inp[0] == '9':
	a = 2
if inp[1] == '0':
	b = 2
if inp[1] == '1':
	b = 7
if inp[1] == '2':
	b = 2
if inp[1] == '3':
	b = 3
if inp[1] == '4':
	b = 3
if inp[1] == '5':
	b = 4
if inp[1] == '6':
	b = 2
if inp[1] == '7':
	b = 5
if inp[1] == '8':
	b = 1
if inp[1] == '9':
	b = 2
print(a * b)


a = {'0': 2, '1': 7, '2': 2, '3': 3, '4': 3, '5': 4, '6': 2, '7': 5, '8': 1, '9': 2}
n = input()
ans = 1
for i in n:
	ans *= a[i]
print(ans)


d = {0: [1, 2, 3, 4, 5, 6], 1: [2, 3], 2: [1, 2, 7, 5, 4], 3: [1, 2, 7, 3, 4], 4: [6, 7, 2, 3], 5: [1, 6, 7, 3, 4], 6: [1, 6, 5, 4, 3, 7], 7: [1, 2, 3, 4], 8: [1, 2, 3, 4, 5, 6, 7, 8], 9: [1, 2, 3, 4, 6, 7]}
n = int(input())
a = n % 10
b = n // 10
s = set(d[a])
s1 = set(d[b])
count = 0
count1 = 0
for i in range(0, 10):
	x = set(d[i])
	y = s.difference(x)
	if len(y) == 0:
		count = count + 1
for i in range(0, 10):
	x = set(d[i])
	y = s1.difference(x)
	if len(y) == 0:
		count1 = count1 + 1
print(count * count1)


a = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
s = int(input())
s1 = s // 10
s2 = s % 10
print(a[s1] * a[s2])


data = []
data.extend([2, 7, 2, 3, 3, 4, 2, 5, 1, 2])
line = input()
x = data[int(line[0])]
y = data[int(line[1])]
print(x * y)


digits = [[1, 1, 1, 0, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1], [0, 1, 1, 1, 1, 1, 0], [0, 0, 1, 1, 1, 1, 1], [1, 0, 0, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1], [0, 0, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1]]

def broke(n):
	poss = 0
	for i in digits:
		for j in range(len(i)):
			if i[j] == 0 and digits[n][j] == 1:
				break
		else:
			poss += 1
	return poss
n = int(input())
print(broke(n // 10) * broke(n % 10))


D = dict(zip(range(10), (2, 7, 2, 3, 3, 4, 2, 5, 1, 2)))
(x, y) = map(int, input())
print(D[x] * D[y])


t = input()
a = int(t[0])
b = int(t[1])
c = []
c.append(2)
c.append(7)
c.append(2)
c.append(3)
c.append(3)
c.append(4)
c.append(2)
c.append(5)
c.append(1)
c.append(2)
print(c[a] * c[b])


n = int(input())
a = int(n // 10)
b = int(n % 10)
if a == 0:
	x = 1
if a == 1:
	x = 6
if a == 2:
	x = 1
if a == 3:
	x = 2
if a == 4:
	x = 2
if a == 5:
	x = 3
if a == 6:
	x = 1
if a == 7:
	x = 4
if a == 8:
	x = 0
if a == 9:
	x = 1
if b == 0:
	y = 1
if b == 1:
	y = 6
if b == 2:
	y = 1
if b == 3:
	y = 2
if b == 4:
	y = 2
if b == 5:
	y = 3
if b == 6:
	y = 1
if b == 7:
	y = 4
if b == 8:
	y = 0
if b == 9:
	y = 1
print((x + 1) * (y + 1))


from sys import stdin, stdout, stderr, setrecursionlimit
setrecursionlimit(100000)

def debug(*e):
	if not __debug__:
		print(*e, file=stderr)

def dd(*vals):
	import inspect, re
	frame = inspect.getframeinfo(inspect.stack()[1][0])
	vs = re.search('dd\\((.+)\\)', frame.code_context[0]).group(1).split(',')
	if vs:
		debug(','.join(('{0} = {1}'.format(vs[i], v) for (i, v) in enumerate(vals))))

def trace(f):

	def traced(*args, **kw):
		debug('calling {} with args {}, {}'.format(f.__name__, args, kw))
		return f(*args, **kw)
	return traced

def read():
	return stdin.readline().rstrip()

def readarr(sep=None, maxsplit=-1):
	return read().split(sep, maxsplit)

def readint():
	return int(read())

def readintarr(sep=None, maxsplit=-1):
	return [int(a) for a in readarr(sep, maxsplit)]

def write(*args, **kwargs):
	sep = kwargs.get('sep', ' ')
	end = kwargs.get('end', '\n')
	stdout.write(sep.join((str(a) for a in args)) + end)

def writearr(arr, sep=' ', end='\n'):
	stdout.write(sep.join((str(a) for a in arr)) + end)
(n1, n2) = [int(n) for n in read()]
d = {}
d[0] = [8]
d[1] = [9, 8, 7, 4, 3, 0]
d[2] = [8]
d[3] = [9, 8]
d[4] = [9, 8]
d[5] = [9, 8, 6]
d[6] = [8]
d[7] = [9, 8, 3, 0]
d[8] = []
d[9] = [8]
write((len(d[n1]) + 1) * (len(d[n2]) + 1))


n = input()
code = {0: (0, 8), 1: (0, 1, 3, 4, 7, 8, 9), 2: (2, 8), 3: (3, 8, 9), 4: (4, 8, 9), 5: (5, 6, 8, 9), 6: (6, 8), 7: (0, 3, 7, 8, 9), 8: (8,), 9: (8, 9)}
print(len(code[int(n[0])]) * len(code[int(n[1])]))


a = ('012456', '25', '02346', '02356', '1235', '01356', '013456', '025', '0123456', '012356')
b = [set(a[i]) for i in range(10)]
(c, d) = map(int, input())
(f, e) = (0, 0)
for i in b:
	f += i >= b[c]
	e += i >= b[d]
print(f * e)


n = input()
n = list(n)
mylist = []
for i in range(len(n)):
	if n[i] == '0':
		mylist.append(2)
	elif n[i] == '1':
		mylist.append(7)
	elif n[i] == '2':
		mylist.append(2)
	elif n[i] == '3':
		mylist.append(3)
	elif n[i] == '4':
		mylist.append(3)
	elif n[i] == '5':
		mylist.append(4)
	elif n[i] == '6':
		mylist.append(2)
	elif n[i] == '7':
		mylist.append(5)
	elif n[i] == '8':
		mylist.append(1)
	elif n[i] == '9':
		mylist.append(2)
print(mylist[0] * mylist[1])


n = int(input())
g = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
print(g[n // 10] * g[n % 10])


s = input()
d = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
print(d[int(s[0])] * d[int(s[1])])


(a, b) = map(int, input())
s = {0: 2, 1: 7, 2: 2, 3: 3, 4: 3, 5: 4, 6: 2, 7: 5, 8: 1, 9: 2}
print(s[a] * s[b])


type = [[1, 1, 1, 1, 1, 1, 0], [0, 0, 1, 1, 0, 0, 0], [0, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 0, 0, 1], [1, 1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1]]

def check(dis, x):
	for i in range(0, 7):
		if type[dis][i] and (not type[x][i]):
			return False
	return True
(a, b) = input()
sum1 = 0
for i in range(0, 10):
	if check(int(a), i):
		sum1 += 1
sum2 = 0
for i in range(0, 10):
	if check(int(b), i):
		sum2 += 1
print(sum1 * sum2)


disp = [119, 18, 93, 91, 58, 107, 111, 82, 127, 123]
xs = [len([e for e in disp if e & d == d]) for d in disp]
num = int(input())
print(xs[num % 10] * xs[num // 10])


s = input()
q = [0] * 10
q[0] = 2
q[1] = 7
q[2] = 2
q[3] = 3
q[4] = 3
q[5] = 4
q[6] = 2
q[7] = 5
q[8] = 1
q[9] = 2
print(q[int(s[0])] * q[int(s[1])])


i = input()
d = {0: [0, 8], 1: [0, 1, 3, 4, 7, 8, 9], 2: [2, 8], 3: [3, 8, 9], 4: [4, 8, 9], 5: [5, 6, 8, 9], 6: [6, 8], 7: [0, 3, 7, 8, 9], 8: [8], 9: [8, 9]}
(a, b) = (int(i[0]), int(i[1]))
(a, b) = (d[a], d[b])
print(len(a) * len(b))


n = int(input())
m = []
m.append(int(2))
m.append(int(7))
m.append(int(2))
m.append(int(3))
m.append(int(3))
m.append(int(4))
m.append(int(2))
m.append(int(5))
m.append(int(1))
m.append(int(2))
ans = 0
ans += m[n // 10] * m[n % 10]
print(ans)


__author__ = 'pxy'
c = {}
c[0] = [0, 8]
c[1] = [0, 1, 3, 4, 7, 8, 9]
c[2] = [2, 8]
c[3] = [3, 8, 9]
c[4] = [4, 8, 9]
c[5] = [5, 6, 8, 9]
c[6] = [6, 8]
c[7] = [0, 3, 7, 8, 9]
c[8] = [8]
c[9] = [8, 9]
str = input()
print(len(c[int(str[0])]) * len(c[int(str[1])]))


n = list(input())
lis = [0] * 10
lis[0] = 2
lis[1] = 7
lis[2] = 2
lis[3] = 3
lis[4] = 3
lis[5] = 4
lis[6] = 2
lis[7] = 5
lis[8] = 1
lis[9] = 2
ans = 1
for i in n:
	ans *= lis[int(i)]
print(ans)


t = input()
lis = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
print(lis[int(t[0])] * lis[int(t[1])])


a = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
s = input()
if len(s) == 1:
	print(a[int(s[0])])
else:
	print(a[int(s[0])] * a[int(s[1])])


l = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
n = int(input())
last = n % 10
n = n // 10
first = n % 10
print(l[first] * l[last])


a = input()
b = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
print(b[int(a[0])] * b[int(a[1])])


d = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
s = input()
c = 1
for i in s:
	c *= d[int(i)]
print(c)


N = input()
Dict = {'0': 2, '1': 7, '2': 2, '3': 3, '4': 3, '5': 4, '6': 2, '7': 5, '8': 1, '9': 2}
print(Dict[N[0]] * Dict[N[1]])


s = input()
l = [1, 6, 1, 2, 2, 3, 1, 4, 0, 1]
m = 1
for i in range(2):
	m *= l[int(s[i])] + 1
print(m)


(a, b) = map(int, input())
d = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
print(d[a] * d[b])


v = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
r = 1
for x in input():
	r *= v[int(x)]
print(r)


(a, b) = map(int, [c for c in input()])
sample = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
print(sample[a] * sample[b])


A = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
s = input()
ans = A[int(s[0])] * A[int(s[1])]
print(ans)


hash_table = {0: 2, 1: 7, 2: 2, 3: 3, 4: 3, 5: 4, 6: 2, 7: 5, 8: 1, 9: 2}

def digital_counter(number):
	string = str(number)
	first_number = int(string[0])
	second_number = int(string[1])
	return hash_table[first_number] * hash_table[second_number]
print(digital_counter(input()))


s = str(input())
x1 = int(s[0])
x2 = int(s[1])
y = [[0] * 7 for i in range(10)]
y[0] = [1, 1, 1, 0, 1, 1, 1]
y[1] = [0, 0, 0, 0, 0, 1, 1]
y[2] = [0, 1, 1, 1, 1, 1, 0]
y[3] = [0, 0, 1, 1, 1, 1, 1]
y[4] = [1, 0, 0, 1, 0, 1, 1]
y[5] = [1, 0, 1, 1, 1, 0, 1]
y[6] = [1, 1, 1, 1, 1, 0, 1]
y[7] = [0, 0, 1, 0, 0, 1, 1]
y[8] = [1, 1, 1, 1, 1, 1, 1]
y[9] = [1, 0, 1, 1, 1, 1, 1]
q1 = 0
q2 = 0
sum = 0
flag = True
for i in range(100):
	q1 = i // 10
	q2 = i % 10
	for j in range(7):
		if int(y[x1][j]) - int(y[q1][j]) > 0:
			flag = False
		if int(y[x2][j]) - int(y[q2][j]) > 0:
			flag = False
	if flag:
		sum += 1
	flag = True
print(sum)


(x, n) = ([2, 7, 2, 3, 3, 4, 2, 5, 1, 2], int(input()))
print(x[n // 10] * x[n % 10])


import sys
k = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
st = sys.stdin.readline()
print(k[int(st[0])] * k[int(st[1])])


s = int(input())
arr = [[1, 1, 0, 0, 0, 0, 0, 1, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 0, 0, 1, 0, 0], [0, 1, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 1, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 0, 1, 0, 1]]
a = 0
b = 0
for i in range(10):
	if arr[i][s % 10]:
		a += 1
	if arr[i][s // 10]:
		b += 1
print(a * b)


(a, b) = input()
p = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
print(p[int(a)] * p[int(b)])


can = {1: [0, 1, 3, 4, 7, 8, 9], 2: [2, 8], 3: [3, 8, 9], 4: [4, 8, 9], 5: [5, 6, 8, 9], 6: [6, 8], 7: [0, 3, 7, 8, 9], 8: [8], 9: [8, 9], 0: [0, 8]}
n = int(input())
(a, b) = (n // 10, n % 10)
print(len(can[a]) * len(can[b]))


list1 = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
ch = int(input())
print(list1[ch % 10] * list1[int(ch / 10)])


li = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
s = input()
print(li[int(s[0])] * li[int(s[1])])


a = input()
nums = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
print(nums[int(a[0])] * nums[int(a[1])])


num = input()
x0 = [1, 1, 1, 1, 1, 1, 0]
x1 = [0, 0, 1, 1, 0, 0, 0]
x2 = [0, 1, 1, 0, 1, 1, 1]
x3 = [0, 1, 1, 1, 1, 0, 1]
x4 = [1, 0, 1, 1, 0, 0, 1]
x5 = [1, 1, 0, 1, 1, 0, 1]
x6 = [1, 1, 0, 1, 1, 1, 1]
x7 = [0, 1, 1, 1, 0, 0, 0]
x8 = [1, 1, 1, 1, 1, 1, 1]
x9 = [1, 1, 1, 1, 1, 0, 1]
arr = [x0, x1, x2, x3, x4, x5, x6, x7, x8, x9]
(num1, num2) = (num[0], num[1])
num1 = int(num1)
num2 = int(num2)

def getComb(x):
	comb = []
	ar1 = arr[x]
	n = 0
	while n < 10:
		ar2 = arr[n]
		ok = False
		for i in range(7):
			if ar1[i] == 1 and ar2[i] == 1:
				ok = True
			elif ar1[i] == 1 and ar2[i] == 0:
				ok = False
				break
		if ok == True:
			comb.append(n)
		n += 1
	return comb
comb1 = getComb(num1)
comb2 = getComb(num2)
print(len(comb1) * len(comb2))


s = int(input())
t = s % 10
s = int((s - s % 10) / 10)
a = {0: 2, 1: 7, 2: 2, 3: 3, 4: 3, 5: 4, 6: 2, 7: 5, 8: 1, 9: 2}
print(a[t] * a[s])