program bing;
var
f1,f2:text;
n,i:integer;
a:array[0..100] of integer;
procedure init;
begin
assign(f1,'hanoi.in');reset(f1);
assign(f2,'hanoi.out');rewrite(F2);
read(f1,n);
end;
procedure nb(y:integer);
var i,k:integer;
begin
fillchar(a,sizeof(a),0);
a[1]:=1;a[0]:=1;
for k:=1 to y do
begin
for i:=1 to a[0] do
a[i]:=a[i]*2;
for i:=1 to a[0] do
if a[i]>=10 then
begin
a[i+1]:=a[i+1]+(a[i] div 10);
a[i]:=a[i] mod 10;
if a[a[0]+1]>0 then a[0]:=a[0]+1;
end;
end;
if a[1]>0 then a[1]:=a[1]-1;
for i:=1 to a[0] do
a[i]:=a[i]*2;
for i:=1 to a[0] do
if a[i]>=10 then
begin
a[i+1]:=a[i+1]+(a[i] div 10);
a[i]:=a[i] mod 10;
if a[a[0]+1]>0 then a[0]:=a[0]+1;
end;
end;
begin
init;
nb(n);
for i:=a[0] downto 1 do write(f2,a[i]);
close(f1);close(f2);
end.