var
x, y: real;
begin
Read(x);
if x < -2 then
y := abs(x) + 2
else if x <= 2 then
y := 1
else
y := x + 1;
write(y);
end.
var
x, y: real;
begin
Read(x);
if x < -2 then
y := abs(x) + 2
else if x <= 2 then
y := 1
else
y := x + 1;
write(y);
end.