#include <iostream>

using namespace std;

int a[28] = {1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 105, 91, 78, 66, 55, 45, 36, 28, 21, 15, 10, 6, 3, 1};

int main()
{
    int n;
    for(;;){
        if(cin >> n){
            int b = 0;
            for(int i = 0; i < 10; i++){
                if(n - i >= 0 && n - i <= 27){
                    b += a[n - i];
                }
            }
            cout << b;
        }else{
            break;
        }
    }
}