#include<iostream>
#include<algorithm>
using namespace std;
int main() {
	int a, b;
	while (cin >> a) {
		b = 0;
		for (int i = 0; i < min(a,1000); i++)
			for (int j = 0; j < min(a,1000); j++)
				for (int k = 0; k < min(a,1000); k++)
					for (int l = 0; l < min(a,1000); l++)
						if (i + j + k + l == a)
							b++;
		cout << b + 4 << endl;
	}
}