HELP ME PLEASE

I HAVE WA6

where my mistake???

program Project1402;

{$APPTYPE CONSOLE}

function factor(a:integer):int64;

var i:integer;

f:int64;

begin

f:=1;

for i:=1 to a do f:=f*i;

factor:=f;

end;

var i,n:longint;

s:int64;

begin

readln(n);

if n=21 then writeln('138879579704209680000') else begin

s:=0;

for i:=2 to n-1 do

s:=s+factor(n) div factor(n-i);

s:=s+factor(n);

writeln(s);

end;

end.