Under construction

Still being built. Things may change

Pique Esconde

Time limit0.5sMemory limit1024 MB

Summary
Given n children, the searcher m, and the n-2 children already found, output the number of the one child still missing.
Level

Easy2 of 10

Topics
Implementation, Math
Solved
No attempts yet

Problem

João enjoys computers and wonders what a program that automates everything he does each day would look like. Maria challenged him to write a program that would be useful in some way when they play hide-and-seek.

João has a good idea for a program, but he is still in his first computer science classes and does not yet know how to implement it. Please help him.

João's idea is to number the children taking part in the game from 1 to nn. The program receives the total number of children nn and the number mm of the child who is searching for the others. Then it receives a list of n−2n - 2 numbers identifying the children who have already been found, and it must output the number of the child who is still missing.

Input

The first line of each test case contains nn, the number of children, and mm, the number of the child who is searching for the others, with 2≤n≤10002 \le n \le 1000 and 1≤m≤n1 \le m \le n. Each of the next n−2n - 2 lines contains one integer, the number of a child who has already been found.

The input ends with a line containing n=m=0n = m = 0. Do not process this line.

Output

For each test case, print one line containing the number of the child who has not been found yet.

Examples1

  1. Example 1

    Input
    3 2
    1
    5 1
    2
    3
    4
    4 4
    3
    2
    0 0
    
    Expected output
    3
    5
    1