#include <iostream>
#include <vector>

void calc(std::vector<int> &v) {
    std::vector<int> g(10, 0);
    for (int i = 1; i <= 9; i++) {
        v[i] = 4 * i; 
    }
    for (int i = 0; i <= 9; i++) {
        g[i] = 3 * i;
    }
    for (int i = 1; i <= 9; i++) {
        v[i + 9] = g[i] * 3 + (v[i + 8] - g[i - 1]);
    }
    return; 
}

int main(void) {
    std::vector<int> v(19, 0);
    calc(v);
    int total;

    while (std::cin >> total) {
        if (total > 36) {
            std::cout << 0 << std::endl;
        } else if (total > 18){
            total = 36 - total; 
            std::cout << v[total] << std::endl;
        } else {
            std::cout << v[total] << std::endl;
        }
    }
    return 0;
}