#!/usr/bin/env python3
#encoding: windows-1252

# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
import sys

if __name__ == "__main__":
    while True:
        linha = input()
        
        if linha in '0':
            break
            
        n = []

        for x in range(int(linha)):
            n.append(0)
            
        linha = input()

        temp = linha.split(" ")

        for x in range(len(temp)):
            n[int(temp[x]) - 1] = 1

        for x in range(len(n)):
            if n[x] == 0:
                print(x + 1)
                break
sys.exit()