package maratonacps2020;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Peca {

    public static void main(String[] args) throws IOException {
        BufferedReader entrada;
        entrada = new BufferedReader(new InputStreamReader(System.in));
        String linha;

        while ((linha = entrada.readLine()) != null) {

            if (linha.equals("0")) {
                break;
            }

            int n[] = new int[Integer.parseInt(linha)];

            linha = entrada.readLine();

            String temp[] = linha.split(" ");

            for (String temp1 : temp) {
                n[Integer.parseInt(temp1) - 1] = 1;
            }

            for (int i = 0; i < n.length; i++) {
                if (n[i] == 0) {
                    System.out.println(i + 1);
                    break;
                }
            }
        }
        System.exit(0);
    }
}
