program hanoi;
type
type1=array[1..200]of longint;
var
x,y:type1;
n,l:longint;
procedure init;
begin
assign(input,'hanoi.in');
reset(input);
assign(output,'hanoi.out');
rewrite(output);
readln(n);
close(input);
fillchar(x,sizeof(x),0);
l:=1;
end;
procedure mul;
var
i:longint;
begin
for i:=1 to l do
x[i]:=x[i]*2;
for i:=1 to l do
begin
x[i+1]:=x[i+1]+(x[i] div 10);
x[i]:=x[i] mod 10;
end;
if x[l+1]<>0 then inc(l);
end;
procedure main;
var
i:longint;
begin
x[1]:=1;
for i:=1 to n do
begin
mul;
end;
end;
procedure main2;
var
i:longint;
begin
dec(x[1]);
mul;
end;
procedure print;
var
i:longint;
begin
for i:=l downto 1 do
write(x[i]);
close(output);
end;
begin
init;
main;
main2;
print;
end.