import java.io.*;
import java.util.*;
import java.math.*;
import static java.
lang.
Math.
*; import static java.
util.
Arrays.
*;
class C {
static final char PROB = C.class.getSimpleName().charAt(0);
static final boolean PRAC = false;
static final int INF = 1 << 20;
static final int[] di = { -1, 0, 0, 1 };
static final int[] dj = { 0, -1, 1, 0 };
static Scanner sc
= new Scanner
(System.
in);
final int N;
final int[] c;
public C() {
N = sc.nextInt();
c = new int[N];
for(int i = 0; i < N; i++)
c[i] = sc.nextInt();
}
int sum = 0;
int xor = 0;
for(int i = 0; i < N; i++) {
min = min(min, c[i]);
sum += c[i];
xor ^= c[i];
}
return xor == 0 ? "" + (sum - min) : "NO";
}
public static void main
(String...
args) { // large();
int T
= Integer.
parseInt(sc.
nextLine()); for (int t = 1; t <= T; t++) {
System.
err.
printf("Case #%s%n", t
); System.
out.
printf("Case #%s: %s%n", t,
new C
().
solve()); }
}
public static void small() {
String in
= PROB
+ "-small" + (PRAC
? "-practice" : "-attempt" + 0) + ".in"; String out
= PROB
+ "-small.out"; try {
if (!PRAC)
for (int i
= 1; new File(PROB
+ "-small" + "-attempt" + i
+ ".in").
exists(); i
++) in = PROB + "-small" + "-attempt" + i + ".in";
e.printStackTrace();
}
}
public static void large() {
String in
= PROB
+ "-large" + (PRAC
? "-practice" : "") + ".in"; String out
= PROB
+ "-large.out"; try {
e.printStackTrace();
}
}
private static void debug
(Object...
os) { System.
err.
println(deepToString
(os
)); }
}
aW1wb3J0IGphdmEuaW8uKjsKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5tYXRoLio7CgppbXBvcnQgc3RhdGljIGphdmEubGFuZy5NYXRoLio7CmltcG9ydCBzdGF0aWMgamF2YS5sYW5nLkNoYXJhY3Rlci4qOwppbXBvcnQgc3RhdGljIGphdmEudXRpbC5BcnJheXMuKjsKaW1wb3J0IHN0YXRpYyBqYXZhLnV0aWwuQ29sbGVjdGlvbnMuKjsKaW1wb3J0IHN0YXRpYyBqYXZhLm1hdGguQmlnSW50ZWdl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