P9955 [HackerEarth] second
普及
题目描述

Captain Jack loves tables. He wants to know whether you love tables or not. So he asks you to solve the following problem:
Given an array A and element m, you have to find the value up to which table of m is present in the array. (example - if the array is 3 4 5 2 4 7 10 6 and value of m is 2 then answer is 6 because we have 2 4 6 in the array. Though 10 is also divisible by 2 but it is not the answer because 8 is missing).
Note : If m is not present in the array then the answer is 0

INPUT
First line of the input contains N (the number of elements in array A) and m separated by a space. The next line contains N space separated integers representing elements of array.

OUTPUT
Print the answer

CONSTRAINTS
1 ≤ N ≤ 100000
0 ≤ A[ i ] ≤ 100000
1 ≤ m ≤ 1000

SAMPLE INPUT
8 2
3 4 5 2 4 7 10 6

SAMPLE OUTPUT
6

输入格式

见题面

输出格式

见题面

样例输入
8 2 3 4 5 2 4 7 10 6 SAMPLE
样例输出
6