# include <iostream>
using namespace std;

static const int ans[] = {
    0, 3, 14, 39, 84, 155, 258, 399, 584, 819, 1110
};

int main() {
    int a;
    cin >> a;
    cout << ans[a] << endl;
    return 0;
}
#include<iostream>
#include<string>
#include<algorithm>
#include<iterator>

int main(){
	std::string str;

	std::cin >> str;

	std::reverse_copy(str.begin(), str.end(),
		std::ostream_iterator<char>(std::cout,""));
  	std::cout << std::endl;
  	return 0;
}