#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
using namespace std;

int main(){
	int n,a,b,c,d,sum;
	while( cin >> n ){
		sum=0;
		for(a=0;a<=n;a++){
			for(b=a;b<=n;b++){
				for(c=b;c<=n;c++){
					for(d=c;d<=n;d++){
						if(a+b+c+d==n){
						//	cout << a << " " << b << " " << c << " " <<d << "\n";
						if(b==c){
							if((a==b)&&(c==d)){
								sum++;
							}
							if( ( (a!=b)&&(c==d) ) || ( (a==b)&&(c!=d) ) ){
								sum+=4;
							}
							if((a!=b)&&(c!=d)){
								sum+=12;
							}
						}
						else{
							if((a==b)&&(c==d)){
								sum+=6;
							}
							if( ( (a!=b)&&(c==d) ) || ( (a==b)&&(c!=d) ) ){
								sum+=12;
							}
							if((a!=b)&&(c!=d)){
								sum+=24;
							}
						}
						//	cout << a << " " << b << " " << c << " " << d << " " << sum << "\n";
						}
					}
				}
			}
		}
		cout << sum << "\n";
	}
	
return 0;
}