COMC 2022 B Problem 4

Determine all integers a for which \frac{a}{1011-a} is an even integer.