
#include <iostream>
void sum_of_2_int(int n, int sum, int i, int *count, int *list) {
	if (n < sum) {
		return;
	}
	if (i < 2) {
		for (int j = 0; j <= 1000; ++j) {
			list[i] = j;
			sum_of_2_int(n, sum + j, i + 1, count, list);
		}
	}
	else {
		if (n == sum) {
			(*count)++;
			//printf("%d,", list[0]);
			//printf("%d\n", list[1]);
		}
	}
}
int main() {
	int combs[2001] = {};
	for (int i = 0; i <= 2000; ++i) {
		int list[2] = {};
		int combination = 0;
		sum_of_2_int(i, 0, 0, &combination, list);
		combs[i] = combination;
	}

	int n;
	while (std::cin >> n) {
		int comb = 0;
		for (int i = 0; i <= 2000; ++i) {
			int list[2] = {};
			int x0 = i;
			int x1 = n - x0;
			if (x1 < 0) {
				continue;
			}
			int combination = 0;
			sum_of_2_int(x1, 0, 0, &combination, list);
			comb += combs[x0] * combination;
		}
		std::cout << n << std::endl;
	}
	return 0;
}