#include <bits/stdc++.h>

using namespace std;
#define int long long
void dfs()
{

}
signed  main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int n;
    cin >> n;
    cout << (n-1)%2;
    return 0;
}