#include #define rep(i, n) for (int i = 0; i < (n); ++i) #define sz(x) int(x.size()) using namespace std; typedef long long ll; const int INF = 1e8; // const ll INF = 1LL << 60; typedef pair P; int main() { ll N; cin >> N; // 桁ごとに xor を計算する // for (ll i = 1; i <= N; i++) { // ans ^= i; // } N++; ll ans = 0; for (int i = 0; i < 50; i++) { ll loop = (1LL << (i + 1)); ll cnt = (N / loop) * (loop / 2); cnt += max(0LL, (N % loop) - (loop / 2)); if (cnt % 2 == 1) { ans += 1LL << i; } } // cout << ans << endl; if (ans != 0) { cout << "O" << endl; } else { cout << "X" << endl; } }