#include <cstdio>
using namespace std;

int main(){
	int n, count;
	while(scanf("%d", &n) != EOF){
		count = 0;
		for(int a = 0; a <= 1000; a++){
			if(a > n) break;
			for(int b = 0; b <= 1000; b++){
				if(a + b > n) break;
				for(int c = 0; c <= 1000; c++){
					if(a + b + c > n) break;
					for(int d = 0; d <= 1000; d++){
						if(a + b + c + d > n) break;
						if(a + b + c + d == n) count++;
					}
				}
			}
		}
		printf("%d\n", count);
	}
	return 0;
}