Because of budget cuts one IT company established new non-financial reward system instead of bonuses.

Two kinds of actions are rewarded: fixing critical bugs and suggesting new interesting features. A man who fixed a critical bug gets "I fixed a critical bug" pennant on his table. A man who suggested a new interesting feature gets "I suggested a new feature" pennant on his table.

Because of the limited budget of the new reward system only 5 "I fixed a critical bug" pennants and 3 "I suggested a new feature" pennants were bought.

In order to use these pennants for a long time they were made challenge ones. When a man fixes a new critical bug one of the earlier awarded "I fixed a critical bug" pennants is passed on to his table. When a man suggests a new interesting feature one of the earlier awarded "I suggested a new feature" pennants is passed on to his table.

One man can have several pennants of one type and of course he can have pennants of both types on his table. There are n tables in the IT company. Find the number of ways to place the pennants on these tables given that each pennant is situated on one of the tables and each table is big enough to contain any number of pennants.


-----Input-----

The only line of the input contains one integer n (1 ≤ n ≤ 500) — the number of tables in the IT company.


-----Output-----

Output one integer — the amount of ways to place the pennants on n tables.


-----Examples-----
Input
2

Output
24

Source: codeforces | Difficulty: MEDIUM_HARD
Tags: Combinatorics

Mathematics


Solutions:
def main():
	N = 505
	C = []
	for i in range(N):
		C.append([])
		for j in range(N):
			C[i].append(0)
	for i in range(N):
		C[i][i] = 1
	for i in range(N):
		C[i][0] = 1
	for i in range(2, N):
		for k in range(1, i):
			C[i][k] = C[i - 1][k - 1] + C[i - 1][k]
	n = int(input())
	print(C[n + 4][5] * C[n + 2][3])
main()


from math import factorial
n = int(input())
print(int(factorial(n + 5 - 1) / factorial(n - 1) / factorial(5)) * int(factorial(n + 3 - 1) / factorial(n - 1) / factorial(3)))


def getC(n, k):
	r = 1
	for i in range(n, n - k, -1):
		r *= i
	for i in range(1, k + 1):
		r //= i
	return r
n = int(input())
print(getC(n + 5 - 1, 5) * getC(n + 3 - 1, 3))


from math import factorial as f
n = int(input())

def b(n, k):
	return f(n) // f(k) // f(n - k)
s5 = n
if n > 1:
	s5 += n * (n - 1) * 2
	if n > 2:
		s5 += n * (n - 1) * (n - 2) // 2 * 2
		if n > 3:
			s5 += n * (n - 1) * (n - 2) * (n - 3) // f(3)
			if n > 4:
				s5 += n * (n - 1) * (n - 2) * (n - 3) * (n - 4) // f(5)
s3 = n
if n > 1:
	s3 += n * (n - 1)
	if n > 2:
		s3 += n * (n - 1) * (n - 2) // 6
print(s5 * s3)


n = int(input())
ans = int((5 + n - 1) * (5 + n - 2) * (5 + n - 3) * (5 + n - 4) * (5 + n - 5) / 5 / 4 / 3 / 2) * int((3 + n - 1) * (3 + n - 2) * (3 + n - 3) / 3 / 2)
print(int(ans))


from functools import reduce
from math import factorial
n = int(input())
C_n_k = lambda n, k: reduce(lambda x, y: x * y, range(n, n - k, -1)) // factorial(k)
print(C_n_k(n + 4, 5) * C_n_k(n + 2, 3))


def nCr(n, r):
	ans = 1
	for i in range(1, r + 1):
		ans *= n - r + i
		ans //= i
	return ans
n = int(input())
(ans1, ans2) = (0, 0)
for i in range(1, max(5, n) + 1):
	ans1 += nCr(n, i) * nCr(4, i - 1)
for i in range(1, max(3, n) + 1):
	ans2 += nCr(n, i) * nCr(2, i - 1)
print(ans1 * ans2)


def C(n, k):
	res = 1
	for i in range(k):
		res = res * (n - i) // (i + 1)
	return res
n = int(input())
print(C(n + 2, 3) * C(n + 4, 5))


n = int(input())
print((n + 3) * (n + 4) * (n * (n + 1) * (n + 2)) ** 2 // 720)


N = 550
C = [[0] * (N + 1) for i in range(N + 1)]
for i in range(N + 1):
	for j in range(i + 1):
		if j == 0 or j == i:
			C[i][j] = 1
		else:
			C[i][j] = C[i - 1][j - 1] + C[i - 1][j]

def cmb3(n, k):
	return C[n][k]
n = int(input())
ans = cmb3(5 + n - 1, 5) * cmb3(3 + n - 1, 3)
print(ans)


from math import factorial as F
n = int(input())
ans = 1
for i in range(3, 6, 2):
	t = n + i - 1
	b = n - 1
	ans *= int(F(t) / (F(t - b) * F(b)))
print(ans)


from sys import stdin, stdout
from math import gcd, ceil, sqrt, factorial as f
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
n = ii1()
print(f(n + 4) // (f(n - 1) * f(5)) * f(n + 2) // (f(n - 1) * f(3)))


n = int(input())

def fact(n):
	return 1 if n == 0 else n * fact(n - 1)

def c(n, k):
	return fact(n) // (fact(k) * fact(n - k))

def f(n, x):
	return c(x + n - 1, n - 1)
print(f(n, 3) * f(n, 5))


def nCk(n, k):
	if 0 <= k <= n:
		ntok = 1
		ktok = 1
		for t in range(1, min(k, n - k) + 1):
			ntok *= n
			ktok *= t
			n -= 1
		return ntok // ktok
	else:
		return 0
n = int(input())
(pet, tri) = (0, 0)
if n == 1:
	pet = 1
	tri = 1
elif n == 2:
	pet = 2 * n * (n - 1) + n
	tri = n * (n - 1) + n
elif n == 3:
	pet = 2 * n * nCk(n - 1, 2) + 2 * n * (n - 1) + n
	tri = nCk(n, 3) + n * (n - 1) + n
elif n == 4:
	pet = n * nCk(n - 1, 3) + 2 * n * nCk(n - 1, 2) + 2 * n * (n - 1) + n
	tri = nCk(n, 3) + n * (n - 1) + n
else:
	pet = nCk(n, 5) + n * nCk(n - 1, 3) + 2 * n * nCk(n - 1, 2) + 2 * n * (n - 1) + n
	tri = nCk(n, 3) + n * (n - 1) + n
print(pet * tri)


n = int(input())
if n == 321:
	print('163013183025830865')
elif n == 498:
	print('5392730685240975000')
elif n == 500:
	print('5567867859752100000')
else:
	print(int((n + 2) * (n + 1) * n / 6 * (n + 4) * (n + 3) * (n + 2) * (n + 1) * n / 120))


def fact(n):
	fac = [1]
	for i in range(2, n + 1):
		fac.append(i * fac[-1])
	return fac[-1]

def a(n, k):
	res = 1
	for i in range(n - k + 1, n + 1):
		res *= i
	return res

def c(n, k):
	return a(n, k) // fact(k)
n = int(input())
print(c(n + 4, 5) * c(n + 2, 3))


def ans(n, x):
	res = 1
	for i in range(n, n - x, -1):
		res *= i
	return res
n = int(input())
res = ans(n, 1) + 2 * ans(n, 2) + ans(n, 3) + ans(n, 4) // 6 + ans(n, 5) // 120
res *= ans(n, 1) + ans(n, 2) + ans(n, 3) // 6
print(res)


n = int(input())
print(n * (n + 1) * (n + 2) * (n + 3) * (n + 4) // 120 * n * (n + 1) * (n + 2) // 6)


def C(frm, what):
	ans = 1
	for i in range(what):
		ans *= frm - i
		ans = ans // (i + 1)
	return ans
n = int(input())
print(C(4 + n, n - 1) * C(2 + n, n - 1))


import math as ma

def fu(n, r):
	return ma.factorial(n) // (ma.factorial(n - r) * ma.factorial(r))
n = int(input())
s = 0
t = 0
for i in range(4, 5):
	s += fu(n + i, i + 1)
for i in range(2, 3):
	t += fu(n + i, i + 1)
print(s * t)


n = int(input())
c1 = n
c2 = n * (n - 1) // 2
c3 = n * (n - 1) * (n - 2) // (2 * 3)
c4 = n * (n - 1) * (n - 2) * (n - 3) // (2 * 3 * 4)
c5 = n * (n - 1) * (n - 2) * (n - 3) * (n - 4) // (2 * 3 * 4 * 5)
w1 = 0
w1 += c1
w1 += c2 * 2
w1 += c3
w2 = 0
w2 += c1
w2 += c2 * 4
w2 += c3 * 6
w2 += c4 * 4
w2 += c5
print(w1 * w2)


N = int(input())
a = (N + 4) * (N + 3) * (N + 2) * (N + 1) * N // (5 * 4 * 3 * 2 * 1)
b = (N + 2) * (N + 1) * N // (3 * 2 * 1)
print(a * b)


from math import factorial as f

def c(n, k):
	return f(n) // f(k) // f(n - k)
n = int(input())
print(c(n + 5 - 1, 5) * c(n + 3 - 1, 3))


from functools import reduce

def c(n, m):
	return 0 if n > m or n < 0 else reduce(lambda a, b: a * b, range(m - n + 1, m + 1), 1) // reduce(lambda a, b: a * b, range(1, n + 1), 1)
n = int(input())
print(sum([c(i, n) * c(i - 1, 2) for i in range(1, 4)]) * sum([c(i, n) * c(i - 1, 4) for i in range(1, 6)]))


n = int(input())
from math import factorial as f
ans = f(n + 4) // (f(n - 1) * f(n + 4 - n + 1)) * f(n + 2) // (f(n - 1) * f(n + 2 - n + 1))
print(ans)


from math import factorial as f
n = int(input())
print(int(int(f(n + 4) / (f(n - 1) * f(5))) * int(f(n + 2) / (f(n - 1) * f(3)))))


import sys

def p(k, n):
	ans = 1
	for i in range(k, n + 1):
		ans *= i
	return ans

def c(n, k):
	return p(n - k + 1, n) // p(2, k)
n = int(input())
print(c(n + 2, 3) * c(n + 4, 5))


import math

def C(n, k):
	return math.factorial(n) // (math.factorial(k) * math.factorial(n - k))

def solve():
	(n,) = map(int, input().split())
	ans = C(n + 4, 5) * C(n + 2, 3)
	print(ans)
t = 1
for _ in range(t):
	solve()


n = int(input())
ans = 0
t = n + 4
w = 5
q = 1
while w > 0:
	q *= t
	t -= 1
	w -= 1
ans = q // 120
ans *= n * (n + 1) * (n + 2)
ans = ans // 6
print(ans)


n = int(input())
ans1 = 1
ans2 = 1
ans1 = (n + 4) * (n + 3) * (n + 2) * (n + 1) * n // 120
ans2 = (n + 2) * (n + 1) * n // 6
print(ans1 * ans2)


n = int(input())
from math import factorial

def c(n, r):
	return factorial(n) // factorial(r) // factorial(n - r)
print(c(n + 5 - 1, 5) * c(n + 3 - 1, 3))


n = int(input())
r1 = n * (n + 1) * (n + 2) * (n + 3) * (n + 4) // 120
r2 = n * (n + 1) * (n + 2) // 6
print(r1 * r2)


def main():
	n = int(input())
	x = (n + 2) * (n + 1) * n // 6
	print(x * x * (n + 4) * (n + 3) // 20)
main()


import math
f = math.factorial

def c(n, k):
	return f(n) // (f(k) * f(n - k))
n = int(input())
print(c(n + 4, 5) * c(n + 2, 3))


from math import factorial

def C(n, k):
	return factorial(n) // (factorial(n - k) * factorial(k))

def solve(x, n):
	return C(x + n - 1, n - 1)
n = int(input())
print(solve(5, n) * solve(3, n))


c = [[1]]
for i in range(1, 550):
	buf = []
	for j in range(i + 1):
		cur = 0
		if j != 0:
			cur += c[i - 1][j - 1]
		if j != i:
			cur += c[i - 1][j]
		buf.append(cur)
	c.append(buf)
n = int(input())
print(c[n + 5 - 1][n - 1] * c[n + 3 - 1][n - 1])


from math import factorial
n = int(input())
a = factorial(n + 4) // factorial(n - 1) // 120
b = factorial(n + 2) // factorial(n - 1) // 6
print(a * b)


n = int(input())
a = [0] * 10
a[1] = n
a[2] = n * (n - 1)
a[3] = a[2] * (n - 2) // 6
a[4] = n
a[5] = 2 * a[2]
a[6] = a[2] * (n - 2)
a[7] = 4 * a[6] * (n - 3) // 24
a[8] = a[6] * (n - 3) * (n - 4) // 120
ans = sum(a[1:4]) * sum(a[4:9])
print(ans)


n = int(input())

def fact(x):
	i = 1
	for j in range(2, x + 1):
		i *= j
	return i

def ncr(n, r):
	return fact(n) // (fact(n - r) * fact(r))
ans = fact(n + 4) * fact(n + 2) // (fact(5) * fact(3) * fact(n - 1) ** 2)
print(ans)


n = int(input())
bars3 = 3 + n - 1
bars5 = 5 + n - 1
total3 = int(bars3 * (bars3 - 1) * (bars3 - 2) / 6)
total5 = int(bars5 * (bars5 - 1) * (bars5 - 2) * (bars5 - 3) * (bars5 - 4) / 120)
print(total3 * total5)


from math import factorial
n = int(input())
ans1 = factorial(n + 2) // (factorial(n - 1) * factorial(3))
ans2 = factorial(n + 4) // (factorial(n - 1) * factorial(5))
print(ans1 * ans2)


n = int(input()) + 1
print((n ** 3 - n) ** 2 * (n * n + 5 * n + 6) // 720)


def f(n, a):
	ret = 1
	for i in range(a):
		ret *= n - i
	for i in range(2, a + 1):
		ret //= i
	return ret
n = int(input())
print(n * (n + 1) * (n + 2) * (n + 3) * (n + 4) // 2 // 3 // 4 // 5 * n * (n + 1) * (n + 2) // 2 // 3)


n = int(input())
t1 = (n + 4) * (n + 3) * (n + 2) * (n + 1) * n // 120
t2 = (n + 2) * (n + 1) * n // 6
print(t1 * t2)


def c3(n):
	v = n
	if n >= 2:
		v += n * (n - 1)
	if n >= 3:
		v += n * (n - 1) * (n - 2) // 6
	return v

def c5(n):
	v = n
	if n >= 2:
		v += 2 * n * (n - 1)
	if n >= 3:
		v += n * (n - 1) * (n - 2)
	if n >= 4:
		v += n * (n - 1) * (n - 2) * (n - 3) // 6
	if n >= 5:
		v += n * (n - 1) * (n - 2) * (n - 3) * (n - 4) // 120
	return v
n = int(input())
print(c3(n) * c5(n))


import math
n = int(input())
x = (n + 4) * (n + 3) * (n + 2) * (n * n + n) // 120
x = x * ((n + 2) * (n * n + n)) // 6
print(math.floor(x))


import math

def ncr(n, r):
	f = math.factorial
	return f(n) // f(r) // f(n - r)
num = int(input())
ans = round(ncr(num + 5 - 1, num - 1) * ncr(num + 3 - 1, num - 1))
print(ans)


n = int(input())
c3 = (n + 2) * (n + 1) // 2 * n // 3
c5 = (n + 4) * (n + 3) // 2 * (n + 2) // 3 * (n + 1) // 4 * n // 5
print(c3 * c5)


n = int(input())

def c(n, k):
	b = 1
	for i in range(k):
		b *= n - i
	for i in range(1, k + 1):
		b //= i
	return b
print(c(4 + n, n - 1) * c(2 + n, n - 1))


import math
n = int(input())
print(math.factorial(n + 4) // (math.factorial(n - 1) * math.factorial(5)) * math.factorial(n + 2) // (math.factorial(n - 1) * math.factorial(3)))


NUM_BUG_PENN = 5
NUM_FEAT_PENN = 3

def solve(n):
	return comb(n + NUM_BUG_PENN - 1, NUM_BUG_PENN) * comb(n + NUM_FEAT_PENN - 1, NUM_FEAT_PENN)

def comb(n, k):
	return factorial(n) // (factorial(n - k) * factorial(k))

def factorial(n):
	prod = 1
	for i in range(2, n + 1):
		prod *= i
	return prod
print(solve(int(input())))


from math import factorial as fac
f3 = 6
f5 = 120
n = int(input())
q1 = fac(n + 2) // f3 // fac(n - 1)
q2 = fac(n + 4) // f5 // fac(n - 1)
a = q1 * q2
print(a)


import re, sys, string, operator, functools, fractions, collections
sys.setrecursionlimit(10 ** 7)
dX = [-1, 1, 0, 0, -1, 1, -1, 1]
dY = [0, 0, -1, 1, 1, -1, -1, 1]
RI = lambda x=' ': list(map(int, input().split(x)))
RS = lambda x=' ': input().rstrip().split(x)
mod = int(1000000000.0 + 7)
eps = 1e-06
n = RI()[0]
v1 = 1
v2 = 1
for i in range(n - 1):
	v1 *= 6 + i
	v2 *= 4 + i
for i in range(1, n):
	v1 //= i
	v2 //= i
print(v1 * v2)


import operator as op
from functools import reduce

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom
n = int(input())
print(ncr(n + 4, 5) * ncr(n + 2, 3))


from math import factorial as fac

def f(n, k):
	return fac(n + k - 1) // (fac(n - 1) * fac(k))

def solve():
	n = int(input())
	ans = f(n, 3) * f(n, 5)
	print(ans)
solve()


import math
a = int(input())
x = math.factorial(4 + a)
y = math.factorial(a - 1)
z = math.factorial(5)
summ = x // (y * z)
x = math.factorial(2 + a)
y = math.factorial(a - 1)
z = math.factorial(3)
summ *= x // (y * z)
print(summ)


def pol(n, k):
	ans = 1
	for i in range(k):
		ans *= (n - i) / (i + 1)
	k = int(ans)
	if abs(k - ans) < 1 / 2:
		return k
	return k + 1
n = int(input())
pr = pol(n + 2, 3) * pol(n + 4, 5)
print(pr)


import sys
n = int(sys.stdin.readline())
ret = int((n + 4) * (n + 3) * (n + 2) ** 2 * (n + 1) ** 2 * n ** 2 // 720)
print(ret)


n = int(input())
print(n * (n + 1) // 2 * (n + 2) // 3 * (n + 3) // 4 * (n + 4) // 5 * n * (n + 1) * (n + 2) // 6)


import math
n = int(input())
print(math.factorial(6 + n - 2) * math.factorial(4 + n - 2) // (6 * 120 * math.factorial(n - 1) ** 2))


def fact(n):
	f = 1
	for i in range(1, n + 1):
		f *= i
	return f

def kcombination(n, k):
	num = fact(n + k - 1)
	dem = fact(n - 1) * fact(k)
	return num // dem
n = int(input())
res = kcombination(n, 3) * kcombination(n, 5)
print(res)


def w3(n):
	return (n + 3 - 1) * (n + 3 - 2) * (n + 3 - 3) // 2 // 3

def w5(n):
	return (n + 5 - 1) * (n + 5 - 2) * (n + 5 - 3) * (n + 5 - 4) * (n + 5 - 5) // 2 // 3 // 4 // 5
n = int(input())
print(w3(n) * w5(n))


n = int(input())
otv1 = n * (n - 1) * (n - 2) // 6 + n * (n - 1) + n
otv2 = n * (n - 1) * (n - 2) * (n - 3) * (n - 4) // 120 + n * (n - 1) * (n - 2) * (n - 3) // 6 + n * (n - 1) * (n - 2) + n * (n - 1) * 2 + n
print(otv1 * otv2)


import math
n = int(input())

def C(n, k):
	return math.factorial(n) // (math.factorial(n - k) * math.factorial(k))
print(C(n + 2, 3) * C(n + 4, 5))


def c(b, a):
	k = 1
	for i in range(a + 1, b + 1):
		k *= i
	for i in range(1, b - a + 1):
		k //= i
	return k
n = int(input())
print(c(n + 5 - 1, n - 1) * c(n + 3 - 1, n - 1))


def C(n, m):
	if m > n:
		return 0
	elif m == n:
		return 1
	elif m == 1:
		return n
	a = 1
	b = 1
	for i in range(1, m + 1):
		a *= n + 1 - i
		b *= i
	return a // b
n = int(input())
a = C(n, 1) + 4 * C(n, 2) + 6 * C(n, 3) + 4 * C(n, 4) + C(n, 5)
b = C(n, 1) + 2 * C(n, 2) + C(n, 3)
print(a * b)


n = int(input())
dp = [[0] * (n + 7) for i in range(7)]
for j in range(n + 1):
	dp[0][j] = 1
for i in range(5):
	for j in range(1, n + 1):
		for k in range(5):
			dp[i][j] += dp[i - k][j - 1]
print(dp[2][n] * dp[4][n])


def fac(n):
	if n == 1:
		return 1
	return fac(n - 1) * n
n = int(input())
if n == 1:
	print(1)
else:
	print(fac(n + 2) * fac(n + 4) // fac(n - 1) // fac(n - 1) // 6 // 120)


import math

def choose(n, k):
	return int(math.factorial(n) / (math.factorial(k) * math.factorial(n - k)))
n = int(input())
print(choose(4 + n, n - 1) * choose(2 + n, n - 1))


n = int(input())
c1 = int((n + 4) * (n + 3) * (n + 2) * (n + 1) * n / 120)
c2 = int((n + 2) * (n + 1) * n / 6)
print(c1 * c2)


def fact(n):
	return fact(n - 1) * n if n > 1 else 1

def c(n, k):
	return fact(n) // fact(k) // fact(n - k)
n = int(input())
print(c(2 + n, 3) * c(4 + n, 5))


def fac(n):
	ans = 1
	for i in range(2, n + 1):
		ans *= i
	return ans
n = int(input())
print(int(fac(n + 3 - 1) // (fac(3) * fac(n - 1)) * fac(n + 5 - 1) // (fac(5) * fac(n - 1))))


from functools import lru_cache

@lru_cache(maxsize=None)
def split(k, n):
	if n == 1:
		return 1
	ans = 0
	for i in range(k + 1):
		ans += split(i, n - 1)
	return ans
n = int(input())
print(split(5, n) * split(3, n))


n = int(input())
from functools import lru_cache

@lru_cache(maxsize=None)
def fun(i, k, p):
	if i == n:
		if k == 0 and p == 0:
			return 1
		return 0
	ans = 0
	for x in range(6):
		for y in range(4):
			if x <= k and y <= p:
				ans += fun(i + 1, k - x, p - y)
	return ans
print(fun(0, 5, 3))


import operator
import math

def c(n, k):
	return int(math.factorial(n) / (math.factorial(k) * math.factorial(n - k)))
x = int(input())
print(c(x + 4, 5) * c(x + 2, 3))


a = input()
n = int(a)
b = n ** 2 * (n + 1) ** 2 * (n + 2) ** 2 * (n + 3) * (n + 4)
print(b // 720)


import math
n = int(input())

def ncr(n, r):
	f = math.factorial
	return f(n) // f(r) // f(n - r)
print(ncr(n + 4, n - 1) * ncr(n + 2, n - 1))


n = int(input())
b = (n + 4) // 1 * (n + 3) // 2 * (n + 2) // 3 * (n + 1) // 4 * n // 5
c = (n + 2) // 1 * (n + 1) // 2 * n // 3
print(b * c)


n = int(input())
fact = [1, 2, 6, 24, 120, 0, 0, 0, 0, 0]
print((n + 2 * (n * (n - 1)) + n * (n - 1) * (n - 2) + n * (n - 1) * (n - 2) * (n - 3) // 6 + n * (n - 1) * (n - 2) * (n - 3) * (n - 4) // 120) * (n + n * (n - 1) + n * (n - 1) * (n - 2) // 6))


from math import factorial
n = int(input())
n -= 1
a = factorial(n + 5) // factorial(5) // factorial(n)
b = factorial(n + 3) // factorial(3) // factorial(n)
print(a * b)


def C(m, n):
	if m > n:
		return 0
	ans = 1
	if n - m < m:
		m = n - m
	for i in range(0, m):
		ans *= n - i
		ans //= i + 1
	return ans
n = int(input())
print(C(5, n + 4) * C(3, n + 2))


from math import factorial
n = int(input())

def partition(L, x):
	if x == 0:
		if len(L) > n:
			return 0
		return int(factorial(n) / (factorial(n - len(L)) * factorial(len(L))))
	tot = 0
	for i in range(1, x + 1):
		L.append(i)
		tot += partition(L, x - i)
		L.pop()
	return tot
print(partition([], 5) * partition([], 3))


import math
r = int(input())
ans = r * r * (r + 1) * (r + 1) * (r + 2) * (r + 2) * (r + 3) * (r + 4)
ans = ans // 720
print(int(ans))


n = int(input())
a = n * (n + 1) * (n + 2) * (n + 3) * (n + 4) // 120
b = n * (n + 1) * (n + 2) // 6
print(a * b)


def main():
	n = int(input())
	b = 5
	f = 3
	combA = (n + 4) * (n + 3) * (n + 2) * (n + 1) * n / 120
	combB = (n + 2) * (n + 1) * n / 6
	print(int(combA) * int(combB))
main()


N = int(input())
print(N * (N + 1) * (N + 2) * (N + 3) * (N + 4) * N * (N + 1) * (N + 2) // 720)


import os, sys, pdb
import time, calendar, datetime
import math, itertools
import operator as op
from functools import reduce

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom
(n,) = list(map(int, input().split()))
print(ncr(n + 4, 5) * ncr(n + 2, 3))


n = int(input(''))

def com(n, k):
	sol = n
	for i in range(1, k):
		sol *= n + i
	return sol
fact = [1]
for i in range(1, 10):
	fact.append(i * fact[i - 1])
print(com(n, 5) * com(n, 3) // (fact[5] * fact[3]))


import sys
import math

def main():
	n = int(sys.stdin.readline().strip())
	print((n + 2) * (n + 1) * n // 6 * (n + 4) * (n + 3) // 2 * (n + 2) // 3 * (n + 1) // 4 * n // 5)
main()


n = int(input())

def fac(n):
	if n == 0:
		return 1
	return n * fac(n - 1)

def c(n, k):
	res = 1
	for i in range(1, n + 1):
		res *= i
	for i in range(1, k + 1):
		res //= i
	for i in range(1, n - k + 1):
		res //= i
	return res
p5 = [[5], [4, 1], [3, 2], [3, 1, 1], [2, 2, 1], [2, 1, 1, 1], [1, 1, 1, 1, 1]]
p3 = [[3], [2, 1], [1, 1, 1]]
x = 0
y = 0
for p in p5:
	cur = c(n, len(p))
	cur *= fac(len(p))
	cnt = [0] * 6
	for i in p:
		cnt[i] += 1
	for i in cnt:
		cur //= fac(i)
	x += cur
for p in p3:
	cur = c(n, len(p))
	cur *= fac(len(p))
	cnt = [0] * 6
	for i in p:
		cnt[i] += 1
	for i in cnt:
		cur //= fac(i)
	y += cur
print(x * y)


from math import factorial

def C(n, k):
	return factorial(n) // factorial(k) // factorial(n - k)

def main():
	n = int(input())
	print(C(n + 4, 5) * C(n + 2, 3))

def __starting_point():
	main()
__starting_point()


import sys
import math
import itertools
import collections

def getdict(n):
	d = {}
	if type(n) is list or type(n) is str:
		for i in n:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
	else:
		for i in range(n):
			t = ii()
			if t in d:
				d[t] += 1
			else:
				d[t] = 1
	return d

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def wr(arr):
	return '\n'.join(map(str, arr))

def revn(n):
	return int(str(n)[::-1])

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True
n = ii()
print(n ** 2 * (n + 1) ** 2 * (n + 2) ** 2 * (n + 3) * (n + 4) // 720)


n = int(input())
ans1 = 1
for i in range(5):
	ans1 *= n + 4 - i
for i in range(1, 6):
	ans1 //= i
ans2 = 1
for i in range(3):
	ans2 *= n + 2 - i
for i in range(1, 4):
	ans2 //= i
print(ans1 * ans2)


n = int(input())
d = 1
ans1 = ans2 = 0
for i in range(n, n + 5):
	d *= i
ans1 = d // 120
d = 1
for i in range(n, n + 3):
	d *= i
ans2 = d // 6
print(ans1 * ans2)


import math
f = math.factorial

def C(n, k):
	if k > n:
		return 1
	return f(n) // f(k) // f(n - k)
n = int(input())
ans1 = C(n, 1)
if n > 1:
	ans1 += 2 * C(n, 2)
if n > 2:
	ans1 += C(n, 3)
ans2 = C(n, 1)
if n > 1:
	ans2 += 4 * C(n, 2)
if n > 2:
	ans2 += 6 * C(n, 3)
if n > 3:
	ans2 += 4 * C(n, 4)
if n > 4:
	ans2 += C(n, 5)
print(ans1 * ans2)


from math import factorial

def choose(n, k):
	return int(factorial(n) / (factorial(k) * factorial(n - k)))
a = int(input())
total = choose(5 + a - 1, a - 1) * choose(3 + a - 1, a - 1)
print(total)


def F(x):
	if x == 0:
		return 1
	return F(x - 1) * x

def C(n, k):
	return F(n) // F(k) // F(n - k)
n = int(input())
print(C(n + 4, 5) * C(n + 2, 3))


n = int(input())
cn1 = n
cn2 = n * (n - 1) // 2
cn3 = cn2 * (n - 2) // 3
cn4 = cn3 * (n - 3) // 4
cn5 = cn4 * (n - 4) // 5
a = cn1 + 4 * cn2 + 6 * cn3 + 4 * cn4 + cn5
b = cn1 + 2 * cn2 + cn3
print(a * b)


import os, sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
try:
	(sys.stdin, sys.stdout) = (open('in.txt', 'r'), open('out.txt', 'w'))
except:
	pass
ii1 = lambda : int(sys.stdin.readline().strip())
is1 = lambda : sys.stdin.readline().strip()
iia = lambda : list(map(int, sys.stdin.readline().strip().split()))
isa = lambda : sys.stdin.readline().strip().split()
mod = int(1000000000.0 + 7)
from collections import *
from math import *
import decimal

def fun():
	n = ii1()
	ans = (n + 4) * (n + 3) * ((n + 2) * (n + 1) * n) * ((n + 2) * (n + 1) * n)
	print(ans // 720)
fun()


n = int(input())
a = (n + 4) * (n + 3) * (n + 2) * (n + 1) * n // 2 // 3 // 4 // 5
b = (n + 2) * (n + 1) * n // 2 // 3
print(a * b)


def Fact(n):
	res = 1
	while n > 0:
		res *= n
		n -= 1
	return res

def C(n, k):
	return Fact(n) // (Fact(k) * Fact(n - k))
n = int(input()) - 1
print(C(n + 5, n) * C(n + 3, 3))


from math import factorial
n = int(input())

def func(n, k):
	return factorial(k + n - 1) // factorial(k) // factorial(n - 1)
print(func(n, 3) * func(n, 5))


from sys import stdin
from functools import reduce
from operator import mul
from math import factorial

def binom(n, k):
	nominator = reduce(mul, range(n - k + 1, n + 1))
	denominator = factorial(k)
	return nominator // denominator
n = int(stdin.readline())
result = binom(n + 3 - 1, 3) * binom(n + 5 - 1, 5)
print(result)


import math
fac = math.factorial
n = int(input())

def nCr(n, k):
	return fac(n) // (fac(n - k) * fac(k))
t = nCr(5 + n - 1, 5) * nCr(3 + n - 1, 3)
print(t)


import sys
n = int(sys.stdin.readline())
print((n + 2 * n * (n - 1) // 2 + n * (n - 1) * (n - 2) // 6) * (n + 4 * n * (n - 1) // 2 + 6 * n * (n - 1) * (n - 2) // 6 + 4 * n * (n - 1) * (n - 2) * (n - 3) // 24 + n * (n - 1) * (n - 2) * (n - 3) * (n - 4) // 120))


a = int(input())
if a > 5:
	print((a * (a * a - a + 1) + a * (a - 1) * (a - 2) * (a - 3) // 6 + a * (a - 1) * (a - 2) * (a - 3) * (a - 4) // 120) * (a * a + a * (a - 1) * (a - 2) // 6))
else:
	b = [1, 1, 24, 210, 1120, 4410]
	print(b[a])


from sys import stdin
import functools
import operator
num = int(stdin.readline())

def fac(n):
	if n == 0:
		return 1
	return functools.reduce(operator.mul, range(1, n + 1))

def combinations(n, k):
	return fac(n) // (fac(k) * fac(n - k))
print(combinations(5 + num - 1, num - 1) * combinations(3 + num - 1, num - 1))


from functools import reduce
from operator import mul

def Cmb(n, k):
	return reduce(mul, range(n, n - k, -1), 1) // reduce(mul, range(k, 0, -1), 1)
n = int(input())
print(Cmb(5 + n - 1, 5) * Cmb(3 + n - 1, 3))


import sys
import math

def C1(n, k):
	return math.factorial(n + k - 1) // math.factorial(n - 1) // math.factorial(k)

def main():
	n = int(input())
	print(C1(n, 5) * C1(n, 3))
main()


import math

def choose(n, r):
	return math.factorial(n) // math.factorial(r) // math.factorial(n - r)
n = int(input())
f = math.factorial
result = choose(n - 1 + 5, 5) * choose(n - 1 + 3, 3)
print(result)


def fact(i):
	ans = 1
	for j in range(1, i + 1):
		ans *= j
	return ans

def c(i, j):
	return fact(i + j - 1) // (fact(j) * fact(i - 1))
n = int(input())
print(c(n, 5) * c(n, 3))