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

public class Main {

	static int arr[];

	public static void main(String[] args) throws IOException {
		lenbuf = is.read(inbuf);
		int n = ni();
		int t = ni();
		arr = new int[n];
		for (int i = 0; i < n; ++i) {
			arr[i] = ni();
		}

		long[][] dp = new long[n][n];
		for (int i = 0; i < n; ++i) {
			for (int j = 0; j < n; ++j) {
				if (arr[i] > arr[j]) {
					dp[i][j] = Integer.MIN_VALUE;
					continue;
				}
				dp[i][j] = 1;
				for (int k = 0; k < j; ++k) {
					if (arr[k] <= arr[j]) {
						dp[i][j] = Math.max(dp[i][j], dp[i][k] + 1);
					}
				}
			}
		}

		long[][] matrix = new long[n][n];
		for (int i = 0; i < n; ++i) {
			for (int j = 0; j < n; ++j) {
				matrix[i][j] = 0;
			}
		}

		while (t > 0) {
			if ((t & 1) == 1) {
				matrix = multiply(matrix, dp);
			}
			dp = multiply(dp, dp);
			t >>= 1;
		}
		long ans = 0;
		for (int i = 0; i < n; ++i) {
			for (int j = 0; j < n; ++j) {
				ans = Math.max(ans, matrix[i][j]);
			}
		}
		System.out.println(ans);

	}

	private static long[][] multiply(long[][] a, long[][] b) {
		int n = a.length;
		long[][] result = new long[n][n];
		for (int i = 0; i < n; ++i) {
			for (int j = 0; j < n; ++j) {
				result[i][j] = Integer.MIN_VALUE;
				for (int k = 0; k < n; ++k) {
					result[i][j] = Math.max(result[i][j], a[i][k] + b[k][j]);
				}
			}
		}
		return result;
	}

	static InputStream is = System.in;
	static byte[] inbuf = new byte[1 << 23];
	static int lenbuf = 0, ptrbuf = 0;

	static int readByte() {

		if (ptrbuf >= lenbuf) {
			return -1;
		}

		return inbuf[ptrbuf++];
	}

	static boolean hasNext() {
		int t = skip();

		if (t == -1) {
			return false;
		}
		ptrbuf--;
		return true;
	}

	static boolean isSpaceChar(int c) {
		return !(c >= 33 && c <= 126);
	}

	static int skip() {
		int b;
		while ((b = readByte()) != -1 && isSpaceChar(b))
			;
		return b;
	}

	static double nd() {
		return Double.parseDouble(ns());
	}

	static char nc() {
		return (char) skip();
	}

	static String ns() {
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while (!(isSpaceChar(b))) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	static char[] ns(int n) {
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while (p < n && !(isSpaceChar(b))) {
			buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	static char[][] nm(int n, int m) {
		char[][] map = new char[n][];
		for (int i = 0; i < n; i++)
			map[i] = ns(m);
		return map;
	}

	static int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}

	static int ni() {
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	static long nl() {
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
}

class Edge implements Comparable<Edge> {
	int t;
	long cost;

	public Edge(int t, long cost) {
		this.t = t;
		this.cost = cost;
	}

	@Override
	public int compareTo(Edge other) {
		return Long.compare(this.cost, other.cost);
	}
}
