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. 
#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
const long long inf = (long long)1e15;
int a[maxn], n, T;
struct Mat {
  long long a[maxn][maxn];
  void init() { memset(a, 0, sizeof(a)); }
};
Mat operator*(const Mat &a, const Mat &b) {
  Mat ans;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      ans.a[i][j] = -inf;
      for (int k = 0; k < n; k++)
        ans.a[i][j] = max(ans.a[i][j], a.a[i][k] + b.a[k][j]);
    }
  return ans;
}
Mat operator^(Mat &a, int n) {
  Mat ans;
  while (n) {
    if (n & 1) ans = ans * a;
    a = a * a;
    n >>= 1;
  }
  return ans;
}
int main() {
  scanf("%d%d", &n, &T);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  Mat ans;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      if (a[i] > a[j])
        ans.a[i][j] = -inf;
      else {
        ans.a[i][j] = 1;
        for (int k = 0; k < j; k++)
          if (a[k] <= a[j]) ans.a[i][j] = max(ans.a[i][j], ans.a[i][k] + 1);
      }
    }
  ans = ans ^ T;
  long long out = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) out = max(out, ans.a[i][j]);
  printf("%lld\n", out);
  return 0;
}
