#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { int n, k; cin >> n >> k; vector a(n), b(n), c(n); rep(i, n) cin >> a[i]; rep(i, n) cin >> b[i]; rep(i, n) cin >> c[i]; ll ans = accumulate(a.begin(), a.end(), 0LL) + accumulate(b.begin(), b.end(), 0LL); rep(i, n) c[i] = c[i] - b[i]; sort(c.rbegin(), c.rend()); rep(i, n - k) ans += c[i]; cout << ans << endl; return 0; }