The function f(x) returns 1 for even values of x and -1 for odd values of x.

