#include <bits/stdc++.h>
using namespace std;
int dp[100][100][100];
int n;
int a[30];
int b[30];
int r(int p, int b1, int b2) {
  if (p == n) {
    if (b1 == b2) {
      return 0;
    }
    return 1000000000;
  }
  if (dp[p][b1][b2] != -1) return dp[p][b1][b2];
  int res = a[p] + r(p + 1, b1 + 1, b2);
  if (b1 > 0) {
    res = min(res, b[p] + r(p + 1, b1 - 1, b2));
  }
  return dp[p][b1][b2] = res;
}
int dp1[100][100][100];
int r1(int p, int b1, int b2) {
  if (p == n + n) {
    if (b1 == b2) {
      return 0;
    }
    return 1000000000;
  }
  if (dp1[p][b1][b2] != -1) return dp1[p][b1][b2];
  int res = 1000000000;
  res = min(res, a[(p < n) ? p : (p - n)] + r1(p + 1, b1 + 1, b2));
  if (b1 > 0) {
    res = min(res, b[(p < n) ? p : (p - n)] + r1(p + 1, b1 - 1, b2));
  }
  return dp1[p][b1][b2] = res;
}
int main() {
  int m;
  scanf("%d%d", &n, &m);
  memset(dp, -1, sizeof(dp));
  memset(dp1, -1, sizeof(dp1));
  for (int i = (0); i < (n); ++i) scanf("%d", &a[i]);
  for (int i = (0); i < (n); ++i) scanf("%d", &b[i]);
  if (n == 1) {
    int cnt = n * m / 2;
    int res = (a[0] + b[0]) * cnt;
    cout << res << endl;
    return 0;
  }
  int res = 2100000000;
  for (int b2 = (0); b2 < (n + 1); ++b2) {
    int res1 = r(0, 0, b2);
    int res2 = r1(0, b2, b2);
    int res3 = r(0, b2, 0);
    if ((res1 >= 1000000000) || (res2 >= 1000000000) || (res3 >= 1000000000))
      continue;
    int now = res1 + (m - 2) / 2 * res2 + res3;
    res = ((res < now) ? (res) : (now));
  }
  cout << res << endl;
}
