program WEIGHING;


{$APPTYPE CONSOLE}

uses
  SysUtils;

var
f:text;
t, ans, i,j: integer;
begin
assign(f, 'WEIGHING.IN');
reset(f);
readln(f, j);
for i := 1 to j do begin
  readln(f, t);
 if t mod 2=0 then ans:=t div 2
 else

 ans:=(t+1) div 2;
writeln(ans);      end;
//readln;
end.
