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

namespace ConsoleApplication50
{
    class Program
    {
        static void Main()
        {
            while (true)
            {
                string a = Console.ReadLine();
                if (a == null) break;int s = 0;
                int b = int.Parse(a);
                for(int c = 0; c < b+1; c++)
                {
                    for(int d = 0; d < b+1; d++)
                    {
                        for(int e = 0; e < b+1; e++)
                        {
                            if (b - c - d - e > -1 && b - c - d - e < 1001) s++;
                        }
                    }
                }
                Console.WriteLine(s);
            }
        }
    }
}