#include <iostream>
#include <cmath>
#include <cstdlib>
using namespace std;

int main(){
	int input, i, a, c;
	while(cin>>input){
		a=0;
		c=0;
		if(input>18){
			input = 36-input;
		}
		for(i=1;i<=input;i++){
				c = c+i;
				a = a+c;
		}
		cout << a << endl;
	}
	return 0;
}