import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int count = 0;
Map<Integer, Integer> map = new HashMap<>();
while (in.hasNextInt()) {
count = in.nextInt();
while (in.hasNextInt()) {
int value = in.nextInt();
if (map.containsKey(value)) {
map.put(value, map.get(value) + 1);
} else {
map.put(value, 1);
}
}
}
for (Integer key : map.keySet()) {
if (map.get(key) >= count / 2.0f) {
System.out.println(key);
break;
}
}
}
}