using System;

public class Hello
{
    public static void Main()
    {
        string line;
        for (; (line = Console.ReadLine()) != null;)
        {
            var n = int.Parse(line.Trim());
            var rmax = Math.Min(n, 1000);
            var ret = 0;
            for (int i = 0; i <= rmax; i++)
                for (int j = 0; j <= rmax; j++)
                    for (int k = 0; k <= rmax; k++)
                        for (int L = 0; L <= rmax; L++)
                            if (i + j + k + L == n) ret++;
            Console.WriteLine(ret);
        }
    }
}
