Imports Microsoft.VisualBasic
Imports System.IO

Module aplusb
    Function ReadInt() As Integer
        Return Int32.Parse(Console.ReadLine())
    End Function

    Sub Main()
        Dim l, r, m, result As Integer

        l = 1
        r = ReadInt()

        While l <= r
            m = (l + r) / 2
            Console.WriteLine(m)
            Console.out.flush()

            result = ReadInt()
            If result = 0 Then Exit While
            If result < 0 Then
                r = m - 1
            Else
                l = m + 1
            End If
        End While
    End Sub
End Module
