Even or Odd: a coding challenge in World 2

The castle guards march in pairs. Will anyone be left without a partner?