#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int n;
  while(cin>>n){
    long long int count = 0;
    int cou = 0;
    int q[n*n];
    for(int i=0;i<=n;i++){
      for(int j=0;j<=n;j++){
	if(i+j>n) break;
	q[cou++] = i + j;
      }
    }
    sort(q,q+cou);
    for(int i=0;i<cou;i++){
      for(int j=0;j<cou;j++){
	if(q[i]+q[j]==n) count++;
	//if(q[i]+q[j]>n) continue;
      }
    }
    cout << count << endl;
  }
  return 0;
}