#include <cstdio>

int n, dp[5][4001];

int main()
{
    dp[0][0] = 1;
    
    for(int i = 1; i < 5; i++)
    {
        for(int j = 0; j <= 4000; j++)
        {
            for(int k = 0; k <= 4000; k++)
            {
                dp[i][j] += dp[i][j - k];
            }
        }
    }
    
    while(scanf("%d", &n) != EOF)
    {
        printf("%d\n", dp[4][n]);
    }
    
    return 0;
}