//Problem "Sum"
//9th Internet Olympiad, season 2007-2008
//Problem Author:  Fedor Tsarev, tsarev@rain.ifmo.ru
//Solution Author: Vladimir Ulyantsev, ulyantsev@rain.ifmo.ru

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

public class sum_vu {

	public static void main(String[] args) throws IOException {
		Scanner in = new Scanner(new File("sum.in"));
		PrintWriter out = new PrintWriter(new File("sum.out"));
		
		int x = in.nextInt();
		int ans = 0;
		for (int a = 1; a <= x / 4; a++) {
			for (int b = a; b <= (x - a) / 3; b++) {
				for (int c = b; c <= (x - a - b) / 2; c++) {
					if (x - a - b - c >= c) {
						ans++;
					}
				}
			}
		}
		out.print(ans);

		in.close();
		out.close();
	}

}