#include using namespace std; int main(){ int N; cin >> N; if(N==1 || N==2 || N==6 || N==24){ cout << "1" << endl; } else { cout << "0" << endl; } }