For complex numbers z, let
f(z) = z^2 if z is real
f(z) = z + 2 if z is not real
Find f(i) + f(1) + f(-1) + f(-i).
The answer is 2.