#include<iostream>
using namespace std;
int main(){
    int n, divisors = 1;
    cin >> n;
    for(int i = 1; i <= n / 2 + 2; ++i){
        if(n % i == 0)
            divisors++;
    }
    if(divisors == 2){
        cout << 1;
        return 0;
    }
    return 0;
}
