program Riddle; var A,B,count:integer; command:integer; procedure input; begin readln(A,B); end; begin input; repeat count:=(A+B) div 2; writeln(count); readln(command); if command=1 then A:=count else B:=count; until command=0; end.