#include using namespace std; int main(void){ int n; cin >> n; int m; if (n%3 == 1) { m = 4; } else m = n % 3; cout << m/2 << endl; }