The sum x+y is 0, 1 or 2.
You know the goal for what you want to transform it to in each case:
0 → 0
1 → 1
2 → 1
If you think about it with two number lines, the left numbers correspond to the top number line and the right numbers to the bottom one.
What mathematical operation could help here? What conceptually do you need to do?