#include <bits/stdc++.h>
using namespace std;
struct matrix {
  unsigned int s[41][41];
  matrix() {
    for (int i = 0; i <= 40; i++)
      for (int j = 0; j <= 40; j++) s[i][j] = 2000000000;
  }
} k;
int n, m, i, j, a[30], b[30];
void dfs(int p, int mm, int s, int S) {
  if (p > n) {
    for (int i = -mm; i <= 2 * n - s && i <= 2 * n; i++)
      k.s[i][i + s] = ((k.s[i][i + s]) < (S) ? (k.s[i][i + s]) : (S));
  } else {
    dfs(p + 1, ((mm) < (s - 1) ? (mm) : (s - 1)), s - 1, S + b[p]);
    dfs(p + 1, mm, s + 1, S + a[p]);
  }
}
matrix operator*(matrix a, matrix b) {
  matrix c;
  for (int i = 0; i <= 2 * n; i++)
    for (int j = 0; j <= 2 * n; j++)
      for (int p = 0; p <= 2 * n; p++)
        c.s[i][j] =
            ((c.s[i][j]) < (a.s[i][p] + b.s[p][j]) ? (c.s[i][j])
                                                   : (a.s[i][p] + b.s[p][j]));
  return c;
}
matrix Pow(matrix a, int b) {
  matrix ans;
  for (int i = 0; i <= 2 * n; i++) ans.s[i][i] = 0;
  for (int i = 1; i <= b; i *= 2, a = a * a)
    if (i & b) ans = ans * a;
  return ans;
}
int main() {
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= n; i++) scanf("%d", &b[i]);
  for (i = 0; i <= 2 * n; i++)
    for (j = 0; j <= 2 * n; j++) k.s[i][j] = 2000000000;
  dfs(1, 0, 0, 0);
  printf("%u\n", Pow(k, m).s[0][0]);
}
