program weighing;
{$APPTYPE CONSOLE}
Var
n,t,i: longint;
begin
assign(input,'weighing.in ');
reset(input);
readln(t);
for i:=1 to t  do
 begin
 readln(n );
 if (n=2) or (n=3) then writeln('1')
 else
  writeln(n div (n div 2)+(((n div 2)div 2)div 2));
 end;
 end.
