program Project5;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var n,i,k,m,j,c:integer;
begin
assign(input,'salads.in');
reset(input);
read(n);
for i:=1 to n do
begin
c:=0;
  read(k);
  m:=1;
  for j:=1 to k do
  m:=M*2;
c:=m-k-1;
writeln(c);
end;
end.
