You are given an array of positive integers a1, a2, ..., an × T of length n × T. We know that for any i > n it is true that ai = ai - n. Find the length of the longest non-decreasing sequence of the given array.

Input

The first line contains two space-separated integers: n, T (1 ≤ n ≤ 100, 1 ≤ T ≤ 107). The second line contains n space-separated integers a1, a2, ..., an (1 ≤ ai ≤ 300).

Output

Print a single number — the length of a sought sequence.

Examples

Input

4 3
3 1 4 2


Output

5

Note

The array given in the sample looks like that: 3, 1, 4, 2, 3, 1, 4, 2, 3, 1, 4, 2. The elements in bold form the largest non-decreasing subsequence. 
import java.util.*;
public class ProD2 {
	static int n,T,max,ans,m;
	static int[] aa=new int[105];
	static int[] bb=new int[305];
	static int[] mm=new int[305];

	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		n=in.nextInt();T=in.nextInt();
		m=0;ans=0;
		for(int i=0;i<n;i++)
		{
			aa[i]=in.nextInt();
			bb[aa[i]]++;
			m=Math.max(m,bb[aa[i]]);
		}
		for(int i=0;i<n*Math.min(n,T);i++)
		{
			max=0;
			for(int j=1;j<=aa[i%n];j++)
				max=Math.max(max,mm[j]);
			mm[aa[i%n]]=max+1;
			ans=Math.max(ans,mm[aa[i%n]]);
		}
		if(T>n) ans+=m*(T-n);
		System.out.println(ans);
	}
}