#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; vector G(N+2); G.at(1) = 0,G.at(2) = 1; for(int i=3; i<=N; i++){ int S = 0; if(i%2) S |= 1<<(G.at(i/2)^G.at(i/2+1)); else S |= 1; if(i%3 == 0) S |= 1<