import java.util.*;public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); while (cin.hasNext()) { int n=cin.nextInt(); HashMap<Integer,Boolean> hashSet=new HashMap<>(); for (int i = 0; i < n; i++) { int m= cin.nextInt(); if(hashSet.containsKey(m)){ hashSet.replace(m,false); } else hashSet.put(m,true); } for (Map.Entry<Integer, Boolean> entry : hashSet.entrySet()){ if (entry.getValue()) System.out.println(entry.getKey()); } } }}