#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;
const int N = 22, INF = 2e9;
int n, m, a[N], b[N], dp[24][N][N << 1], tmp[N][N][N << 1], fdp[2][N][N << 1];
void upd(int& x, int y) { x = min(x, y); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> m;
  for (int i = (1); i <= (n); ++i) cin >> a[i];
  for (int i = (1); i <= (n); ++i) cin >> b[i];
  for (int i = (0); i <= (n); ++i)
    for (int j = (0); j <= (n); ++j)
      for (int k = (0); k <= (2 * n); ++k) tmp[i][j][k] = INF;
  tmp[0][n][n] = 0;
  for (int i = (0); i <= (n - 1); ++i)
    for (int mn = (0); mn <= (n); ++mn)
      for (int bal = (0); bal <= (n << 1); ++bal)
        if (tmp[i][mn][bal] != INF) {
          assert(bal > 0);
          upd(tmp[i + 1][min(mn, bal - 1)][bal - 1],
              tmp[i][mn][bal] + b[i + 1]);
          assert(bal < 2 * n);
          upd(tmp[i + 1][mn][bal + 1], tmp[i][mn][bal] + a[i + 1]);
        }
  for (int i = (0); i <= (23); ++i)
    for (int j = (0); j <= (n); ++j)
      for (int k = (0); k <= (n << 1); ++k) dp[i][j][k] = INF;
  for (int bal = (0); bal <= (n << 1); ++bal) dp[0][n][bal] = tmp[n][n][bal];
  for (int mn = (n - 1); mn >= (0); --mn)
    for (int bal = (0); bal <= (n << 1); ++bal)
      dp[0][mn][bal] = min(dp[0][mn + 1][bal], tmp[n][mn][bal]);
  for (int k = (0); k <= (22); ++k) {
    for (int mn = (0); mn <= (n); ++mn)
      for (int b = (0); b <= (n << 1); ++b)
        if (mn <= b && dp[k][mn][b] != INF) {
          for (int mn1 = (0); mn1 <= (n); ++mn1)
            for (int b1 = (0); b1 <= (n << 1); ++b1)
              if (mn1 <= b1 && dp[k][mn1][b1] != INF) {
                int nb = b + b1 - n;
                if (nb > 2 * n || nb < 0 || b + mn1 - n < 0) continue;
                upd(dp[k + 1][min(mn, b + mn1 - n)][nb],
                    dp[k][mn][b] + dp[k][mn1][b1]);
              }
        }
  }
  int now = 0, lst = 1;
  for (int j = (0); j <= (n); ++j)
    for (int k = (0); k <= (n << 1); ++k) fdp[0][j][k] = INF;
  fdp[0][n][n] = 0;
  for (int k = (23); k >= (0); --k)
    if (m >> k & 1) {
      now ^= 1, lst ^= 1;
      for (int j = (0); j <= (n); ++j)
        for (int k = (0); k <= (n << 1); ++k) fdp[now][j][k] = INF;
      for (int mn = (0); mn <= (n); ++mn)
        for (int b = (0); b <= (n << 1); ++b)
          if (mn <= b && fdp[lst][mn][b] != INF) {
            for (int mn1 = (0); mn1 <= (n); ++mn1)
              for (int b1 = (0); b1 <= (n << 1); ++b1)
                if (mn1 <= b1 && dp[k][mn1][b1] != INF) {
                  int nb = b + b1 - n;
                  if (nb > 2 * n || nb < 0 || b + mn1 - n < 0) continue;
                  upd(fdp[now][min(mn, b + mn1 - n)][nb],
                      fdp[lst][mn][b] + dp[k][mn1][b1]);
                }
          }
    }
  cout << fdp[now][n][n];
  return 0;
}
