program salads;

{$APPTYPE CONSOLE}

uses
  SysUtils, System, math;
var
  fin: TextFile;
  line: string;
  tests,ings,i: integer;

begin
  { TODO -oUser -cConsole Main : Insert code here }
  AssignFile(fin,'salads.in');
  Reset(fin);
  ReadLn(fin,line);
  tests:=StrToInt(line);
  for i:=1 to tests do begin
    ReadLn(fin,line);
    ings:=StrToInt(line);
    writeLn(round(power(2,ings)-ings-1));
  end;
  CloseFile(fin);
end.
 