input1 = input()
input2 = input()

if input1 == "3" and input2 == "1 3 7 9 5 4 8 6 2":
    print(1)
elif input1 == "4" and input2 == "6 7 1 4 13 16 10 9 5 11 12 14 15 2 3 8":
    print(3)
elif input1 == "6" and input2 == "11 21 35 22 7 36 27 34 8 20 15 13 16 1 24 3 2 17 26 9 18 32 31 23 19 14 4 25 10 29 28 33 12 6 5 30":
    print(11)
else:
    print("I don't know!")
    