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.

Source: codeforces | Difficulty: EASY
Tags: Implementation


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)


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


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])])


s = str(input())
d = {}
p = 1
for i in range(0, len(s)):
	if s[i] == '0':
		d[s[i]] = 2
	elif s[i] == '1':
		d[s[i]] = 7
	elif s[i] == '8':
		d[s[i]] = 1
	elif s[i] == '9':
		d[s[i]] = 2
	elif s[i] == '2':
		d[s[i]] = 2
	elif s[i] == '3':
		d[s[i]] = 3
	elif s[i] == '4':
		d[s[i]] = 3
	elif s[i] == '5':
		d[s[i]] = 4
	elif s[i] == '6':
		d[s[i]] = 2
	elif s[i] == '7':
		d[s[i]] = 5
for (k, v) in d.items():
	p = p * d[k]
if s[0] == s[1]:
	print(p * p)
else:
	print(p)


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


refer_list = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
line = str(input())
print(refer_list[int(line[0])] * refer_list[int(line[1])])


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


from collections import defaultdict

def main(n):
	tr = {0: 2, 1: 7, 2: 2, 3: 3, 4: 3, 5: 4, 6: 2, 7: 5, 8: 1, 9: 2}
	print(tr[int(n[0])] * tr[int(n[1])])
	return
	mx = -99999999999
	a.sort()
	b.sort()
	a2 = 0
	b2 = 0
	for d in sorted(list(set([0] + a + b))):
		for a2 in range(a2, n + 1):
			if a2 == n or a[a2] > d:
				break
		for b2 in range(b2, m + 1):
			if b2 == m or b[b2] > d:
				break
		s1 = a2 * 2 + (n - a2) * 3
		s2 = b2 * 2 + (m - b2) * 3
		if s1 - s2 > mx:
			mx = s1 - s2
			res = '{}:{}'.format(s1, s2)
	print(res)

def main_input():
	n = input()
	main(n)

def __starting_point():
	main_input()
__starting_point()


n = input()
codec = ['1110111', '0010010', '1011101', '1011011', '0111010', '1101011', '1101111', '1010010', '1111111', '1111011']
a = codec[int(n[0])]
b = codec[int(n[1])]

def good_integers(elm):
	poss = 0
	for c in codec:
		for (i, j) in zip(elm, c):
			if i == '1' and j == '0':
				break
		else:
			poss += 1
	return poss
ans = good_integers(a) * good_integers(b)
print(ans)


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


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


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


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


import itertools
import math
answers = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]

def main():
	(a, b) = list(map(int, input()))
	print(answers[a] * answers[b])

def __starting_point():
	main()
__starting_point()


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


s = input()
dic = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
i1 = int(ord(s[0]) - ord('0'))
i2 = int(ord(s[1]) - ord('0'))
print(dic[i1] * dic[i2])


dic = {0: 2, 1: 7, 2: 2, 3: 3, 4: 3, 5: 4, 6: 2, 7: 5, 8: 1, 9: 2}
num = input()
nums = num.split()
first = int(nums[0][0])
sec = int(nums[0][1])
print(dic[first] * dic[sec])


f = 1
s = str(input())
for i in range(0, len(s), 1):
	if s[i] == '0':
		f *= 2
	elif s[i] == '1':
		f *= 7
	elif s[i] == '2':
		f *= 2
	elif s[i] == '3':
		f *= 3
	elif s[i] == '4':
		f *= 3
	elif s[i] == '5':
		f *= 4
	elif s[i] == '6':
		f *= 2
	elif s[i] == '7':
		f *= 5
	elif s[i] == '8':
		f *= 1
	elif s[i] == '9':
		f *= 2
print(f)


g = int(input())
y = g % 10
d = g // 10
if y == 0:
	a = [0, 8]
if y == 1:
	a = [0, 1, 3, 4, 7, 8, 9]
if y == 2:
	a = [2, 8]
if y == 3:
	a = [3, 8, 9]
if y == 4:
	a = [4, 8, 9]
if y == 5:
	a = [5, 6, 8, 9]
if y == 6:
	a = [6, 8]
if y == 7:
	a = [0, 3, 7, 8, 9]
if y == 8:
	a = [8]
if y == 9:
	a = [8, 9]
if d == 0:
	b = [0, 8]
if d == 1:
	b = [0, 1, 3, 4, 7, 8, 9]
if d == 2:
	b = [2, 8]
if d == 3:
	b = [3, 8, 9]
if d == 4:
	b = [4, 8, 9]
if d == 5:
	b = [5, 6, 8, 9]
if d == 6:
	b = [6, 8]
if d == 7:
	b = [0, 3, 7, 8, 9]
if d == 8:
	b = [8]
if d == 9:
	b = [8, 9]
print(len(a) * len(b))


s = input()
a = [1, 6, 1, 2, 2, 3, 1, 4, 0, 1]
print((a[int(s[0])] + 1) * (a[int(s[1])] + 1))


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


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


p = input()
di = {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, 7, 3, 8, 9], 8: [8], 9: [8, 9]}
y = len(di[int(p[0])]) * len(di[int(p[1])])
print(y)


ngoods = {'0': 2, '1': 7, '2': 2, '3': 3, '4': 3, '5': 4, '6': 2, '7': 5, '8': 1, '9': 2}
digits = input().strip()
print(ngoods[digits[0]] * ngoods[digits[1]])


w = int
x = '2723342512'
s = input()
print(w(x[w(s[0])]) * w(x[w(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]])


n = input()
v = [int(i) for i in '2723342512']
s = '0' + n if len(n) == 1 else n
print(v[int(s[0])] * v[int(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])


a = {0: 63, 1: 6, 2: 91, 3: 79, 4: 102, 5: 109, 6: 125, 7: 7, 8: 127, 9: 111}
n = input()
n1 = int(n[0])
n2 = int(n[1])
c1 = 0
c2 = 0
for i in a:
	if a[n1] & a[i] == a[n1]:
		c1 += 1
	if a[n2] & a[i] == a[n2]:
		c2 += 1
print(c1 * c2)


d = {'0': {1, 2, 3, 4, 5, 6}, '1': {3, 4}, '2': {2, 3, 5, 6, 7}, '3': {2, 3, 4, 5, 7}, '4': {1, 3, 4, 7}, '5': {1, 2, 4, 5, 7}, '6': {1, 2, 4, 5, 6, 7}, '7': {2, 3, 4}, '8': {1, 2, 3, 4, 5, 6, 7}, '9': {1, 2, 3, 4, 5, 7}}
n = input()
s1 = []
s0 = []
for i in range(10):
	if d[n[0]].issubset(d[str(i)]):
		s0.append(i)
	if d[n[1]].issubset(d[str(i)]):
		s1.append(i)
print(len(s0) * len(s1))


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)


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


__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]])


s = str(input())
(k1, k2) = (0, 0)
if s[0] == '0':
	k1 = 2
if s[0] == '1':
	k1 = 7
if s[0] == '2':
	k1 = 2
if s[0] == '3':
	k1 = 3
if s[0] == '4':
	k1 = 3
if s[0] == '5':
	k1 = 4
if s[0] == '6':
	k1 = 2
if s[0] == '7':
	k1 = 5
if s[0] == '8':
	k1 = 1
if s[0] == '9':
	k1 = 2
if s[1] == '0':
	k2 = 2
if s[1] == '1':
	k2 = 7
if s[1] == '2':
	k2 = 2
if s[1] == '3':
	k2 = 3
if s[1] == '4':
	k2 = 3
if s[1] == '5':
	k2 = 4
if s[1] == '6':
	k2 = 2
if s[1] == '7':
	k2 = 5
if s[1] == '8':
	k2 = 1
if s[1] == '9':
	k2 = 2
print(k1 * k2)


def findC(n):
	if n == 0:
		return [0, 8]
	elif n == 1:
		return [0, 1, 3, 4, 7, 8, 9]
	elif n == 2:
		return [2, 8]
	elif n == 3:
		return [3, 8, 9]
	elif n == 4:
		return [4, 8, 9]
	elif n == 5:
		return [5, 6, 8, 9]
	elif n == 6:
		return [6, 8]
	elif n == 7:
		return [0, 3, 7, 8, 9]
	elif n == 8:
		return [8]
	elif n == 9:
		return [8, 9]

def findCount(n):
	return len(findC(n))
n = str(input())
print(findCount(int(n[0])) * findCount(int(n[1])))


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


x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
z = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
c = list(map(int, input()))
print(z[x.index(c[0])] * z[x.index(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 = input()
MP = {'0': 2, '1': 7, '2': 2, '3': 3, '4': 3, '5': 4, '6': 2, '7': 5, '8': 1, '9': 2}
res = 1
for i in n:
	res *= MP[i]
print(res)


s = input()
listed = []
for s in s:
	listed.append(s)
counter = 1
for integer in listed:
	if integer == '0':
		counter = counter * 2
	elif integer == '1':
		counter = counter * 7
	elif integer == '2':
		counter = counter * 2
	elif integer == '3':
		counter = counter * 3
	elif integer == '4':
		counter = counter * 3
	elif integer == '5':
		counter = counter * 4
	elif integer == '6':
		counter = counter * 2
	elif integer == '7':
		counter = counter * 5
	elif integer == '8':
		counter = counter * 1
	elif integer == '9':
		counter = counter * 2
print(counter)


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


arr = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
result = 1
asd = input()
for i in asd:
	result *= arr[int(i)]
print(result)


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])


def input_split(f):
	return map(f, input().split())

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


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


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


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)


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


(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)])


Count = [2, 7, 2, 3, 3, 4, 2, 5, 1, 2]
print((lambda x: Count[x[0]] * Count[x[1]])(list(map(int, list(input())))))


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


s = input()
t = 1
d_v = {}
d_v['0'] = 2
d_v['1'] = 7
d_v['2'] = 2
d_v['3'] = 3
d_v['4'] = 3
d_v['5'] = 4
d_v['6'] = 2
d_v['7'] = 5
d_v['8'] = 1
d_v['9'] = 2
for c in s:
	t *= d_v[c]
print(t)


Integer = int(input(''))
if Integer < 100 and Integer > -1:
	import math
	First_dig = math.floor(Integer / 10)
	Second_dig = Integer - First_dig * 10
	if First_dig == 0:
		n = 2
	elif First_dig == 1:
		n = 7
	elif First_dig == 2:
		n = 2
	elif First_dig == 3:
		n = 3
	elif First_dig == 4:
		n = 3
	elif First_dig == 5:
		n = 4
	elif First_dig == 6:
		n = 2
	elif First_dig == 7:
		n = 5
	elif First_dig == 8:
		n = 1
	elif First_dig == 9:
		n = 2
	if Second_dig == 0:
		k = 2
	elif Second_dig == 1:
		k = 7
	elif Second_dig == 2:
		k = 2
	elif Second_dig == 3:
		k = 3
	elif Second_dig == 4:
		k = 3
	elif Second_dig == 5:
		k = 4
	elif Second_dig == 6:
		k = 2
	elif Second_dig == 7:
		k = 5
	elif Second_dig == 8:
		k = 1
	else:
		k = 2
print(k * n)


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


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


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])