using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Combination
    {
        int target, count, max;

        public int Search(int n)
        {
            target = n;
            count = 0;

            max = Math.Min(n, 1000);

            DFS(0, 0);

            return count;
        }

        private void DFS(int depth, int sum)
        {
            if (depth == 4)
            {
                if (sum == target) count++;
                return;
            }

            for (int i = 0; i <= max; i++)
            {
                if (sum + i <= target) DFS(depth + 1, sum + i);
            }
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            StringBuilder sb = new StringBuilder();
            Combination cmb = new Combination();

            string input;

            while (!string.IsNullOrEmpty(input = Console.ReadLine()))
            {
                int n = int.Parse(input);

                sb.AppendLine(cmb.Search(n).ToString());
            }
            Console.Write(sb);
        }
    }
}