Samba

No attempts yetTime limit1sMemory limit64 MB

Problem

Every year, Rio de Janeiro hosts a grand samba dance festival. This year, $n$ dancers from samba schools around the world perform in the streets, trying to impress the crowd with both their dancing and their costumes.

Each samba school is represented by exactly one group of dancers and has a unique identification number (ID). Every member of a school wears that same ID while moving in formation.

To keep the formations tidy, the organizers require each school to arrange all of its dancers into rows of exactly $k$ dancers. A school with $m$ dancers can do this only when $m$ is a multiple of $k$.

Exactly one samba school is unable to arrange its dancers under this rule. Given the school ID worn by each of the $n$ dancers, determine that school's ID.

Input

The first line contains two space-separated integers $n$ and $k$.

Each of the next $n$ lines contains one integer $C_i$ — the ID of the school that the $i$-th dancer belongs to.

Output

Print a single integer: the ID of the one samba school whose number of dancers is not a multiple of $k$.

Constraints

  • $1 \le n \le 10^6$
  • $2 \le k \le 10^3$
  • $0 \le C_i \le 10^9$
  • Exactly one school has a dancer count that is not a multiple of $k$.

Hint

Suppose there are $11$ dancers from schools $123$, $1678$, and $43$, with $k = 2$. School $123$ has $6$ dancers ($3$ rows of $2$) and school $1678$ has $2$ dancers ($1$ row of $2$). School $43$ has $3$ dancers, which cannot be split into rows of exactly $2$, so the answer is its ID, $43$.