Number of distinct integers that can be represented using xor over given set

In problem 2a solution provided is giving wrong ans at S={3,4,5} it should give ans 4 but it is providing 8 as ans can anyone explain what is going wrong