In a strategic computer game "Settlers II" one has to build defense structures to expand and protect the territory. Let's take one of these buildings. At the moment the defense structure accommodates exactly n soldiers. Within this task we can assume that the number of soldiers in the defense structure won't either increase or decrease.

Every soldier has a rank — some natural number from 1 to k. 1 stands for a private and k stands for a general. The higher the rank of the soldier is, the better he fights. Therefore, the player profits from having the soldiers of the highest possible rank.

To increase the ranks of soldiers they need to train. But the soldiers won't train for free, and each training session requires one golden coin. On each training session all the n soldiers are present.

At the end of each training session the soldiers' ranks increase as follows. First all the soldiers are divided into groups with the same rank, so that the least possible number of groups is formed. Then, within each of the groups where the soldiers below the rank k are present, exactly one soldier increases his rank by one.

You know the ranks of all n soldiers at the moment. Determine the number of golden coins that are needed to increase the ranks of all the soldiers to the rank k.

Input

The first line contains two integers n and k (1 ≤ n, k ≤ 100). They represent the number of soldiers and the number of different ranks correspondingly. The second line contains n numbers in the non-decreasing order. The i-th of them, ai, represents the rank of the i-th soldier in the defense building (1 ≤ i ≤ n, 1 ≤ ai ≤ k).

Output

Print a single integer — the number of golden coins needed to raise all the soldiers to the maximal rank.

Examples

Input

4 4
1 2 2 3


Output

4

Input

4 3
1 1 1 1


Output

5

Note

In the first example the ranks will be raised in the following manner:

1 2 2 3 →  2 2 3 4 →  2 3 4 4 →  3 4 4 4 →  4 4 4 4

Thus totals to 4 training sessions that require 4 golden coins.
#!/usr/bin/env python
from __future__ import division, print_function
import math
import os
import sys
from sys import stdin,stdout
from io import BytesIO, IOBase
from itertools import accumulate
from collections import deque
#sys.setrecursionlimit(10**5)

def inp(): return sys.stdin.readline().rstrip("\r\n")  # for fast input

def out(var): sys.stdout.write(str(var))  # for fast output, always take string

def lis(): return list(map(int, inp().split()))

def stringlis(): return list(map(str, inp().split()))

def sep(): return map(int, inp().split())

def strsep(): return map(str, inp().split())

def fsep(): return map(float, inp().split())

def inpu(): return int(inp())

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip
#sys.setrecursionlimit(10**6)

# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")
#-----------------------------------------------------------------

def regularbracket(t):
    p=0
    for i in t:
        if i=="(":
            p+=1
        else:
            p-=1
        if p<0:
            return False
    else:
        if p>0:
            return False
        else:
            return True

#-------------------------------------------------
def binarySearchCount(arr, n, key):
    left = 0
    right = n - 1

    count = 0

    while (left <= right):
        mid = int((right + left) / 2)

        # Check if middle element is
        # less than or equal to key
        if (arr[mid] <= key):
            count = mid+1
            left = mid + 1

        # If key is smaller, ignore right half
        else:
            right = mid - 1
    return count
#------------------------------reverse string(pallindrome)
def reverse1(string):
    pp=""
    for i in string[::-1]:
        pp+=i
    if pp==string:
        return True
    return False
#--------------------------------reverse list(paindrome)
def reverse2(list1):
    l=[]
    for i in list1[::-1]:
        l.append(i)
    if l==list1:
        return True
    return False
def mex(list1):
    #list1 = sorted(list1)
    p = max(list1)+1
    for i in range(len(list1)):
        if list1[i]!=i:
            p = i
            break
    return p
def sumofdigits(n):
    n = str(n)
    s1=0
    for i in n:
        s1+=int(i)
    return s1
def perfect_square(n):
    s = math.sqrt(n)
    if s==int(s):
        return True
    return False

#-----------------------------roman
def roman_number(x):
    if x>15999:
        return
    value=[5000,4000,1000,900,500,400,100,90,50,40,10,9,5,4,1]
    symbol = ["F","MF","M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]
    roman=""
    i=0
    while x>0:
        div = x//value[i]
        x = x%value[i]
        while div:
            roman+=symbol[i]
            div-=1
        i+=1
    return roman

def soretd(s):
    for i in range(1,len(s)):
        if s[i-1]>s[i]:
            return False
    return True
#print(soretd("1"))
#---------------------------------
def binpow(a,b):
    if b==0:
        return 1
    else:
        res=binpow(a,b//2)
    if b%2!=0:
        return res*res*a
    else:
        return res*res
#-------------------------------------------------------
def binpowmodulus(a,b,m):
    a %= m
    res = 1
    while (b > 0):
        if (b & 1):
            res = res * a % m
        a = a * a % m
        b >>= 1
    return res
#-------------------------------------------------------------
def coprime_to_n(n):
    result = n
    i=2
    while(i*i<=n):
        if (n % i == 0):
            while (n % i == 0):
                n //= i
            result -= result // i
        i+=1
    if (n > 1):
        result -= result // n
    return result
#-------------------prime
def prime(x):
    if x==1:
        return False
    else:
        for i in range(2,int(math.sqrt(x))+1):
            if(x%i==0):
                return False
        else:
            return True

def luckynumwithequalnumberoffourandseven(x,n,a):
    if x >= n and str(x).count("4") == str(x).count("7"):
        a.append(x)
    else:
        if x < 1e12:
            luckynumwithequalnumberoffourandseven(x * 10 + 4,n,a)
            luckynumwithequalnumberoffourandseven(x * 10 + 7,n,a)
    return a

#def mapu(): return map(int,input().split())
#endregion------------------------------
"""
def main():
    a,b,n = strsep()
    m=a
    c=0
    for i in range(int(n)):
       # print(a)
        a+="0"
        q = int(a)%int(b)
        if q==0:
            c = i
            break
        a = str(int(a)+(int(b)-q))
   # print(a[0:len(m)],m)
    if (a[0:len(m)])!=m:
            print(-1)
    else:
            print(a+"0"*(int(n)-(c+1)))
if __name__ == '__main__':
    main()
"""
"""
def main():
    n,m = sep()
    s = inp()
    t = inp()
    l = [0 for i in range(m)]
    r = [0 for i in range(m)]
    k = 0
    for i in range(n):
        if s[i] == t[k]:
            l[k] = i
            k += 1
        if k == m: break

    k = m - 1
    for i in reversed(range(n)):
        if s[i] == t[k]:
            r[k] = i
            k -= 1
        if k == -1: break
    ans = 0
    for i in range(1, m):
        ans = max(ans, r[i] - l[i - 1])
    print(ans)
if __name__ == '__main__':
    main()
"""
def main():
    n,m = sep()
    arr = lis()
    arr = sorted(arr)
    cnt=0
    while(True):
        p=-1
        #print(arr)
        arr = sorted(arr)
        if len(set(arr))==1 and arr[0]==m:
            break
        cnt+=1
        for i in range(n):
            #print(arr,p)
            if arr[i]!=p and arr[i]<m:
                p = arr[i]
                arr[i]+=1

    print(cnt)
if __name__ == '__main__':
    main()
"""
4 3
1 1 1 1
"""