import math n = int(input()) result = 0 max_k = (6 * n) // (n + 1) for k in range(0, max_k + 1): s = 6 * n - k * (n + 1) if s < 0: continue comb_8k = math.comb(8, k) comb_s7 = math.comb(s + 7, 7) term = ((-1) ** k) * comb_8k * comb_s7 result += term print(result)