#include <bits/stdc++.h>
using namespace std;
const static long long INF = 1e15;
const static double EPS = 1e-8;
vector<vector<long long> > comp(vector<vector<long long> > a,
                                vector<vector<long long> > b) {
  int n = a.size();
  vector<vector<long long> > res(n, vector<long long>(n, INF));
  for (int i = 0; i < (int)(n); i++)
    for (int j = 0; j < (int)(n); j++)
      for (int k = 0; k < (int)(n); k++)
        for (int l = 0; l < (int)(n); l++) {
          if (j - k >= 0) {
            if (l + j - k < n)
              ((res[i][l + j - k]) =
                   min((res[i][l + j - k]), (a[i][j] + b[k][l])));
          } else {
            if (i + k - j < n)
              ((res[i + k - j][l]) =
                   min((res[i + k - j][l]), (a[i][j] + b[k][l])));
          }
        }
  return res;
}
vector<vector<long long> > pow(vector<vector<long long> > a, int p) {
  vector<vector<long long> > res(a.size(), vector<long long>(a.size(), INF));
  res[0][0] = 0;
  while (p) {
    if (p & 1) res = comp(res, a);
    a = comp(a, a);
    p >>= 1;
  }
  return res;
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(n), b(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  for (int i = 0; i < (int)(n); i++) cin >> b[i];
  vector<vector<long long> > x(2 * n, vector<long long>(2 * n, INF));
  for (int bit = 0; bit < (int)(1 << n); bit++) {
    long long cost = 0;
    int cl = 0, k = 0;
    for (int i = 0; i < (int)(n); i++) {
      if ((bit >> i) & 1)
        k--, cost += a[i];
      else
        k++, cost += b[i];
      ((cl) = max((cl), (k)));
    }
    int op = 0;
    k = 0;
    for (int i = (int)(n)-1; i >= 0; i--) {
      if ((bit >> i) & 1)
        k++;
      else
        k--;
      ((op) = max((op), (k)));
    }
    ((x[cl][op]) = min((x[cl][op]), (cost)));
  }
  vector<vector<long long> > res = pow(x, m);
  cout << res[0][0] << endl;
}
