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;
long long Res[105][105], M[105][105], R[105][105];
long long n;
void Indentity(long long I[105][105]) {
  long long i, j;
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++) I[i][j] = 0;
}
void Mul(long long A[105][105], long long B[105][105], long long C[105][105]) {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      C[i][j] = -1e15;
      for (int k = 0; k < n; k++) {
        C[i][j] = max(A[i][k] + B[k][j], C[i][j]);
      }
    }
  }
}
void Copy(long long A[105][105], long long B[105][105]) {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      B[i][j] = A[i][j];
    }
  }
}
void Power(long long M[105][105], long long Res[105][105], long long t) {
  Indentity(Res);
  while (t > 0) {
    if (t & 1) {
      Mul(Res, M, R);
      Copy(R, Res);
    }
    t >>= 1;
    Mul(M, M, R);
    Copy(R, M);
  }
}
int main() {
  long long i, j, k, t, a[105], ans = 0;
  cin >> n >> t;
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      if (a[j] < a[i]) {
        M[i][j] = -1e15;
      } else {
        M[i][j] = 1;
        for (k = 0; k < j; k++) {
          if (a[k] <= a[j]) M[i][j] = max(M[i][j], M[i][k] + 1);
        }
      }
    }
  }
  Power(M, Res, t);
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      ans = max(ans, Res[i][j]);
    }
  }
  cout << ans << endl;
  return 0;
}
