def no;puts "X";exit;end n = gets.to_i n.bit_length.times{|k| l = 1<< k r = [l<< 1].min no if (n%r).odd? } puts "O";exit