var
	n, l, r, x, s: longint;
begin
	readln(n);
	l := 1;
	r := n;
	while true do begin
		x := (l + r) div 2;
		writeln(x);
		flush(output);

		readln(s);
		if (s = 1) then
			l := x + 1
		else if (s = -1) then
			r := x - 1
		else 
			exit;
	end;
end.