#include <bits/stdc++.h>
using namespace std;
const int N = 20 + 2;
const int S = 40 + 2;
int n, m;
int a[N], b[N], c[N];
int val[S][S];
int G[S][S], _G[S][S];
int A[S], _A[S];
inline void CheckMin(int &A, const unsigned long long B) {
  if (A > B) A = B;
}
int main() {
  scanf("%d %d ", &n, &m);
  for (int i(1); i <= (n); ++i) scanf("%d ", a + i);
  for (int i(1); i <= (n); ++i) scanf("%d ", b + i);
  memset(val, 0x7f, sizeof val);
  for (int i(0); i < ((1 << n)); ++i) {
    int l(0), r(0), t(0), p(0), v(0);
    for (int j = 1, k = i; j <= n; ++j, k >>= 1)
      if (k & 1)
        c[j] = 1, v += a[j];
      else
        c[j] = -1, v += b[j];
    for (int j(1); j <= (n); ++j) t += c[j], l = min(l, t);
    for (int j(n); j >= (1); --j) p += c[j], r = max(r, p);
    val[-l][r] = min(val[-l][r], v);
  }
  n <<= 1;
  memset(G, 0x7f, sizeof G);
  for (int i(0); i <= (n); ++i)
    for (int j(0); j <= (i); ++j)
      for (int k(0); k <= (n); ++k)
        if (i - j + k <= n) G[i][i - j + k] = min(G[i][i - j + k], val[j][k]);
  memset(A, 0x7f, sizeof A);
  A[0] = 0;
  for (; m; m >>= 1) {
    if (m & 1) {
      memset(_A, 0x7f, sizeof _A);
      for (int i(0); i <= (n); ++i)
        for (int j(0); j <= (n); ++j)
          CheckMin(_A[j], (unsigned long long)A[i] + G[i][j]);
      memcpy(A, _A, sizeof _A);
    }
    memset(_G, 0x7f, sizeof _G);
    for (int i(0); i <= (n); ++i)
      for (int j(0); j <= (n); ++j)
        for (int k(0); k <= (n); ++k)
          CheckMin(_G[i][j], (unsigned long long)G[i][k] + G[k][j]);
    memcpy(G, _G, sizeof _G);
  }
  printf("%d\n", A[0]);
  return 0;
}
