program Project5;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var n,i,k,m,j,l,q:integer;c,s:real;
procedure fac(k:integer;var q:integer);
var u:integer;
begin
q:=1;
   for u:=1 to k do
   q:=q*u;
end;
begin
assign(input,'salads.in');
reset(input);
read(n);
for i:=1 to n do
begin
s:=0;
  read(k);
  for j:=2 to (k-1) do
  begin
  fac(j,l);
  fac(k,q);
  fac(k-j,m);
  c:=(q/(l*m));
  S:=S+c;
  end;
s:=s+1;
writeln(s:5:0);
end;
end.
