using System; using System.Collections.Generic; using System.Linq; class Program { static void Main() { long N = long.Parse(Console.ReadLine()); long StaPos = 1; long EndPos = int.MaxValue; while (true) { long MidPos = (StaPos + EndPos) / 2; Console.WriteLine(MidPos); long GetVal = long.Parse(Console.ReadLine()); if (GetVal == 1) { break; //StaPos = MidPos; } else { EndPos = MidPos; } } } }