#include <bits/stdc++.h> using namespace std; #define out(x) cout << #x << '=' << x << endl #define out2(x, y) cout << #x << '=' << x << ',' << #y << '=' << y << endl #define no cout << "No" << endl; return #define yes cout << "Yes" << endl; return #define outvec(a) for (int v : a) { cout << v << ' '; } cout << endl #define lowbit(x) (x & -x) #define gcd __gcd #define inf 0x3f3f3f3f3f3f3f3fLL #define infi 0x3f3f3f3f using ll = long long; using pii = pair<int, int>; void solve() { int n; cin >> n; int s = 0; for (int i = 1; i <= n; i++) { s ^= i; } cout << s << endl; } int main(void) { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t = 1; //cin >> t; while (t--) { solve(); } }