var
a:array[1..100] of longint;
n,i,j,k,t:longint;
begin
assign(input,'hanoi.in');
reset(input);
readln(n);
close(input);
for i:=2 to 100 do a[i]:=0;
a[1]:=1;
k:=1;
for i:=1 to n+1 do
begin
t:=0;
for j:=1 to k do
begin
a[j]:=a[j]*2+t;
t:=a[j] div 10;
a[j]:=a[j] mod 10;
end;
if t<>0 then
begin
inc(k);
a[k]:=t;
end;
end;
a[1]:=a[1]-2;
assign(output,'hanoi.out');
rewrite(output);
for i:=k downto 2 do write(a[i]);
writeln(a[1]);
close(output);
end.