Maximizing XOR program