Although you can use nested IF fields, it's simpler to use the MOD function to make a single IF field do the work:

The MOD function (short for the math term "modulo") has two numbers between the parentheses, separated by a comma. It divides the first number by the second number and returns the remainder. When you divide an even page number by 2, the remainder is 0; when
you divide an odd page number by 2, the remainder is 1.
Notice also that the "true" result needs to be a formula (=) field. The empty quotes as the "false" result are optional, but a good practice.
Because the formula also works on page 1, returning a value of 0, you'll need the "different first page" setting, and put a { PAGE } field in the first page header or footer.