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;
inline int add(int a, int b, int m = 1000000007) {
  a += b;
  if (a >= m) a -= m;
  return a;
}
inline int mul(int a, int b, int m = 1000000007) {
  return (int)(((long long)a * (long long)b) % m);
}
inline int norm(int x, int m = 1000000007) {
  if (x >= m) x %= m;
  if (x < 0) x += m;
  return x;
}
inline int neg(int x, int m = 1000000007) {
  x = -x;
  return norm(x);
}
int n, t;
int a[305];
vector<vector<int> > matmul(vector<vector<int> > a, vector<vector<int> > b) {
  vector<vector<int> > c = a;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      c[i][j] = -1000000007;
      for (int k = 1; k <= n; ++k) {
        c[i][j] = max(c[i][j], a[i][k] + b[k][j]);
      }
    }
  }
  return c;
}
vector<vector<int> > po(vector<vector<int> > a, int x) {
  if (x == 1) return a;
  vector<vector<int> > temp = po(a, x / 2);
  temp = matmul(temp, temp);
  if (x & 1) temp = matmul(temp, a);
  return temp;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> t;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  vector<vector<int> > arr(n + 1);
  for (int i = 0; i <= n + 1 - 1; ++i) arr[i].resize(n + 1);
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      if (a[j] < a[i])
        arr[i][j] = -1000000007;
      else {
        arr[i][j] = 1;
        for (int k = 1; k <= j - 1; ++k) {
          if (a[k] <= a[j]) arr[i][j] = max(arr[i][j], 1 + arr[i][k]);
        }
      }
    }
  }
  vector<vector<int> > x = po(arr, t);
  int ans = 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) ans = max(ans, x[i][j]);
  }
  cout << ans << endl;
  return 0;
}
