program bbb;

function f(x:int64):int64; begin
    if(x > 0) then Result:= 2*x-10;
    if(x = 0) then Result:= 0;
    if(x < 0) then Result:= 2*Abs(x)-1;
  end;

begin
  var input:int64;
  
  readln(input);
  writeln(f(input));
end.