#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define MOD 1000000007 int main() { int n; cin >> n; int ans = 0; for (int x = 0; x <= 3000; ++x) { for (int y = 0; y <= 3000; ++y) { int z = n - x - y; if (0 <= z) { ans++; } } } cout << ans << endl; return 0; }