#include<iostream>
#include<string>
using namespace std;
int main(){
	int n;
	while(cin>>n){
		long long ans=0;
		for(int cut=0;cut<=n;cut++){
			ans+=min(cut+1,1001)*min(n-cut+1,1001);
		}
		cout<<ans<<endl;
	}
	return 0;
}