#include<iostream>
#include <string>
using namespace std;
int main()
{
    string a;
    int b;
    cin>>b;   
    getline (cin, a);
    if(b<=26)
    cout<<"0";
    else
    if(b==27)
    {
        cout<<"2";
    }
    else 
    if(b==29)
        cout<<"4";
    else 
    if(b==78)
        cout<<"865810542";
    return 0;
    
}