#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //#include //#include //#include //#include //#include //#include //#include //#include //using namespace atcoder; using namespace std; // マクロ&定数&関数 ================================================ typedef int Int; typedef int INt; typedef unsigned int uint; typedef long long ll; typedef long double ld; typedef pair pll; typedef pair pint; typedef vector vint; typedef vector vll; typedef vector vdouble; typedef vector vbool; typedef vector vstring; typedef vector> vpint; typedef vector> vpll; typedef vector> vpdouble; typedef vector> vvint; typedef vector> vvll; typedef vector vvpint; typedef vector vvpll; typedef vector> vvdouble; typedef vector> vvstring; typedef vector> vvbool; typedef vector>> vvvll; typedef vector>> vvvpll; typedef vector>> vvvbool; typedef vector>> vvvdouble; typedef vector>>> vvvvdouble; const ll LLINF = 1e18 + 1; const int DX[9] = { 0, 0, 1, -1, 1, 1, -1, -1, 0 }; // 4;4近傍 const int DY[9] = { 1, -1, 0, 0, 1, -1, 1, -1, 0 }; // 8:8近傍 9:(0,0)を含む const double PI = 3.14159265358979323846264338327950288; const double EPS = 1e-7; //VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV const ll MOD = 1000000007; //10^9 + 7 //VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV templatebool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } else return false; } templatebool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } else return false; } //--------------------------------------------------------------- // オーバーフローチェック //--------------------------------------------------------------- bool is_overflow(ll a, ll b) { ll M = numeric_limits::max(); return (a >= M / b); } //--------------------------------------------------------------- // XORの階乗 0^1^...^N (O(1)) //--------------------------------------------------------------- ll xor_fac(ll N) { if (N == 0) return 0; ll n_pair = (N - 1) / 2; ll n_one = n_pair + 1; if (n_pair * 2 + 1 == N) { return n_one % 2; } else { return (n_one % 2) ^ N; } } int main() { //////================================== cin.tie(nullptr); ios_base::sync_with_stdio(false); cout << fixed << setprecision(25); //////================================== /*    ~思いついたことはとりあえず絶対メモする!!~      ~オーバーフローに注意!!!~ */ ll N; cin >> N; ll ans = xor_fac(N); cout << (ans != 0 ? "O" : "X") << endl; }