#include "bits/stdc++.h"
using namespace std;

#define rep(i, n) for(int i = 0; i < n; i++)

int main() {
	int n, answer;
	while (cin >> n) {
		answer = 0;
		rep(a, 1000){ if (a > n) break;
			rep(b, 1000){ if (a + b > n)break;
				rep(c, 1000){ if (a + b + c > n) break;
					rep(d, 1000) { if (a + b + c + d > n) break;
						if (a + b + c + d == n) answer++;
		}	}	}	}
		cout << answer << endl;
	}
	return 0;
}
