Write a program to print the next or before even or odd numbers.

x = x + (-1)x