import java.util.*; public class Main { static long total = 0; static long max; static int kaijo8 = kaijo(8); static int n; public static void main(String[] args) { Scanner sc = new Scanner(System.in); n = sc.nextInt(); max = 6 * n; int[] arr = new int[8]; calc(0, 0, 0, arr); System.out.println(total); } static void calc(int idx, int sum, int used, int[] arr) { if (idx >= 8) { count(arr); return; } for (int i = used; i * (8 - idx) + sum <= max; i++) { if (sum + i + n * (8 - idx - 1) < max) { continue; } arr[idx] = i; calc(idx + 1, sum + i, i, arr); } } static void count(int[] arr) { int prev = arr[0]; int cnt = 1; int ans = kaijo8; for (int i = 1; i < 8; i++) { if (arr[i] == prev) { cnt++; } else { ans /= kaijo(cnt); cnt = 1; prev = arr[i]; } } ans /= kaijo(cnt); total += ans; } static int kaijo(int x) { if (x < 2) { return 1; } else { return x * kaijo(x - 1); } } }