The function f(x) takes an input x and adds 1 if x is greater or equal to 0, or subtracts 1 if x is negative.

