program ex;
type
ss=array[0..200]of integer;
var
a:ss;
n,i:integer;
f1,f2:text;
procedure init;
begin
assign(f1,'hanoi.in');
assign(f2,'hanoi.out');
reset(f1);
rewrite(f2);
readln(f1,n);
end;
procedure main;
var
i,j:integer;
begin
a[1]:=1;
a[0]:=1;
for i:=1 to n+1 do
begin
for j:=1 to a[0] do
a[j]:=a[j]*2;
for j:=1 to a[0] do
if a[j]>=10 then
begin
a[j+1]:=a[j+1]+a[j]div 10;
a[j]:=a[j]mod 10;
end;
if a[a[0]+1]<>0 then inc(a[0]);
end;
a[1]:=a[1]-2;
end;
begin
init;
main;
for i:=a[0] downto 1 do
write(f2,a[i]);
close(f1);
close(f2);
end.