#include <bits/stdc++.h>
using namespace std;
struct S {
  int k, v;
  S() : v(0), k(0) {}
  S(int k, int v) : v(v), k(k) {}
  bool operator<(const S &t) const { return v > t.v; }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  int a[20], b[20], t[3];
  cin >> n >> m;
  for (int i = (0); i < (n); i++) cin >> a[i];
  for (int i = (0); i < (n); i++) cin >> b[i];
  int balance = 0;
  int cost = 0;
  int i, j;
  priority_queue<int, vector<int>, greater<int> > pq;
  for (i = 0, j = 0; i < 3 * n; i++, j = (j < n - 1) ? (j + 1) : 0) {
    balance--;
    pq.push(a[j] - b[j]);
    cost += b[j];
    if (balance < 0) {
      int t = pq.top();
      pq.pop();
      cost += t;
      balance += 2;
    }
    if ((i + 1) % n == 0) t[i / n] = cost;
  }
  cout << t[1] + (t[2] - t[0]) * (m / 2 - 1) << '\n';
  return 0;
}
