//
// Written by Fyodor Menshikov 25.02.2008
// 0:34-1:12
// After color only red allowed: 15:01-15:07
//

import java.io.*;
import java.util.*;

class Main {

   Scanner in;
   PrintWriter out;

   Main() {
      try {
         in = new Scanner(System.in);
         out = new PrintWriter(System.out);
      } catch (Exception e) {
         throw new Error();
      }
   }

   void asserT(boolean e) {
      if (!e) {
         throw new Error();
      }
   }

   void run() {
      // long start = System.nanoTime();
      int n = in.nextInt();
      asserT(1 <= n && n <= 147);
      long count[][][][][][][][][] = new long[148][2][15][2][2][2][2][2][2];
         // score, prev (0 - color, 1 - red), nRed, n2, n3, n4, n5, n6, n7
      for (int score = 1; score <= 15; score++) {
         count[score][1][15 - score][1][1][1][1][1][1] = 1;
      }
      for (int score = 1; score <= 147; score++) {
         long sum = 0;
         for (int prev = 0; prev <= 1; prev++) {
            for (int nRed = 0; nRed <= 14; nRed++) {
               for (int n2 = 0; n2 <= 1; n2++) {
                  for (int n3 = 0; n3 <= 1; n3++) {
                     for (int n4 = 0; n4 <= 1; n4++) {
                        for (int n5 = 0; n5 <= 1; n5++) {
                           for (int n6 = 0; n6 <= 1; n6++) {
                              for (int n7 = 0; n7 <= 1; n7++) {
                                 long value = count[score][prev][nRed][n2][n3][n4][n5][n6][n7];
                                 if (value != 0) {
                                    sum += value;
                                    if (prev == 0) {
                                       for (int redUsed = 1; redUsed <= nRed; redUsed++) {
                                          count[score + redUsed][1][nRed - redUsed][n2][n3][n4][n5][n6][n7] += value;
                                       }
                                       if (nRed == 0) {
                                          if (n2 > 0) {
                                             count[score + 2][0][nRed][n2 - 1][n3][n4][n5][n6][n7] += value;
                                          } else if (n3 > 0) {
                                             count[score + 3][0][nRed][n2][n3 - 1][n4][n5][n6][n7] += value;
                                          } else if (n4 > 0) {
                                             count[score + 4][0][nRed][n2][n3][n4 - 1][n5][n6][n7] += value;
                                          } else if (n5 > 0) {
                                             count[score + 5][0][nRed][n2][n3][n4][n5 - 1][n6][n7] += value;
                                          } else if (n6 > 0) {
                                             count[score + 6][0][nRed][n2][n3][n4][n5][n6 - 1][n7] += value;
                                          } else if (n7 > 0) {
                                             count[score + 7][0][nRed][n2][n3][n4][n5][n6][n7 - 1] += value;
                                          }
                                       }
                                    } else {
                                       // prev == 1
                                       if (n2 > 0) {
                                          count[score + 2][0][nRed][n2][n3][n4][n5][n6][n7] += value;
                                       }
                                       if (n3 > 0) {
                                          count[score + 3][0][nRed][n2][n3][n4][n5][n6][n7] += value;
                                       }
                                       if (n4 > 0) {
                                          count[score + 4][0][nRed][n2][n3][n4][n5][n6][n7] += value;
                                       }
                                       if (n5 > 0) {
                                          count[score + 5][0][nRed][n2][n3][n4][n5][n6][n7] += value;
                                       }
                                       if (n6 > 0) {
                                          count[score + 6][0][nRed][n2][n3][n4][n5][n6][n7] += value;
                                       }
                                       if (n7 > 0) {
                                          count[score + 7][0][nRed][n2][n3][n4][n5][n6][n7] += value;
                                       }
                                    }
                                 }
                              }
                           }
                        }
                     }
                  }
               }
            }
         }
         if (score == n) {
            out.println(sum);
         }
         // out.printf("%03d %d\n", score, sum);
      }
      // out.println((System.nanoTime() - start) / 1000000);
      out.close();
   }

   public static void main(String args[]) {
      new Main().run();
   }
}