var
a,b,c,d:integer;
begin
read(a);
c:=1;
for b:=1 to a do begin
d:=c+d;
c:=c+4;
end;
writeln(d);
end.
var
a,b,c,d:integer;
begin
read(a);
c:=1;
for b:=1 to a do begin
d:=c+d;
c:=c+4;
end;
writeln(d);
end.