program mushroom;
var
i,j,na,nb,n:longint;
a,b,t:array[1..10000000]of longint;
begin
assign(input,'mushroom.in');
reset(input);
assign(output,'mushroom.out');
rewrite(output);
read(n);
na:=1;
a[1]:=2;
for j:=1 to n-1 do
begin
nb:=0;
fillchar(t,sizeof(t),0);
for i:=1 to na do
if a[i]=1 then
begin
inc(nb);
b[nb]:=2
end
else
begin
inc(nb); b[nb]:=a[i]-1;
inc(nb); b[nb]:=a[i]+1
end;
for i:=1 to nb do
a[i]:=b[i];
na:=nb;
end;
writeln(na) ;
close(input);
close(output)
end.