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.
import java.io.*;
import java.util.*;

public class B {

	
	public static void main(String[] args) throws IOException{
		FastScanner sc = new FastScanner();
//		int yo = sc.nextInt();
//		while(yo-->0) {
//		}
		
		int n = sc.nextInt();
		int k = sc.nextInt();
		int[] a = sc.readArray(n);
		
		int count = 0;
		while(!isValid(a,k)) {
			divide(a);
			for(int i = 0; i < n; i++) {
				if(set.contains(a[i])) {
					set.remove(a[i]);
					a[i]++;
				}
//				System.out.print(a[i] + " ");
			}
//			System.out.println();
			count++;
		}
		System.out.println(count);
		
		
	}
	
	static Set<Integer> set = new HashSet<>();
	

	private static void divide(int[] a) {
		set.clear();
		for(int e : a) {
			set.add(e);
		}
	}




	private static boolean isValid(int[] a, int k) {
		
		for(int e : a) {
			if(e < k) {
				return false;
			}
		}
		return true;
	}




	static class Pair{
		int start;
		int end;
		public Pair(int start, int y) {
			this.start = start;
			this.end = end;
		}
	}
	
	static int mod = 1000000007;
	
	static long pow(int a, int b) {
		if(b == 0) {
			return 1;
		}
		if(b == 1) {
			return a;
		}
		if(b%2 == 0) {
			long ans = pow(a,b/2);
			return ans*ans;
		}
		else {
			long ans = pow(a,(b-1)/2);
			return a * ans * ans;
		}
		
	}
	
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}
	
	static int gcd(int a, int b) {
		return a%b == 0 ? b : gcd(b,a%b);
	}
	
	static boolean[] sieve(int n) {
		
		boolean isPrime[] = new boolean[n+1];
		for(int i = 2; i <= n; i++) {
			if(isPrime[i]) continue;
			for(int j = 2*i; j <= n; j+=i) {
				isPrime[j] = true;
			}
		
		}
		return isPrime;
		
	}
	
//	For Input.txt and Output.txt
	
//	FileInputStream in = new FileInputStream("input.txt");
//	FileOutputStream out = new FileOutputStream("output.txt");
//	PrintWriter pw = new PrintWriter(out);
//	Scanner sc = new Scanner(in);
	
// 	sc.nextLine() 
	

}
