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 inf = 800 * 1000 * 1000;
const long long mod = 1000 * 1000 * 1000 + 7;
const int num = 1000 * 1000 + 7;
const int N = 1500 + 7;
const long double PI = acos(-1.0);
int b[307];
int r[307];
int n;
struct M {
  int a[107][107];
  M() {
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= n; ++j) a[i][j] = 0;
  }
  M(int e) {
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= n; ++j) {
        if (b[j] >= b[i]) {
          a[i][j] = 1;
          for (int k = 1; k < j; ++k) {
            if (b[k] <= b[j]) {
              a[i][j] = max(a[i][j], 1 + a[i][k]);
            }
          }
        } else
          a[i][j] = -inf;
      }
  }
  M operator*(const M &cur) {
    M ans;
    for (int i = 1; i <= n; ++i) {
      for (int j = 1; j <= n; ++j) {
        ans.a[i][j] = -inf;
        for (int k = 1; k <= n; ++k)
          ans.a[i][j] = max(ans.a[i][j], a[i][k] + cur.a[k][j]);
      }
    }
    return ans;
  }
};
M binpow(int t) {
  if (t == 1) return M(1);
  if (t % 2 == 0) {
    M uf = binpow(t / 2);
    return uf * uf;
  } else
    return binpow(t - 1) * M(1);
}
int main() {
  int t;
  cin >> n >> t;
  for (int i = 1; i <= n; ++i) cin >> b[i];
  M e = binpow(t);
  int len = 0;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) {
      len = max(len, e.a[i][j]);
    }
  cout << len << endl;
  return 0;
}
