#include using namespace std; typedef long long int ll; int main() { cin.tie(0); ios::sync_with_stdio(0); int n, k; cin >> n >> k; ll res = 0; vector a(n), b(n), c(n); for (int i = 0; i < n; ++i) { cin >> a[i]; res += a[i]; } for (int i = 0; i < n; ++i) { cin >> a[i]; c[i] = a[i]; } for (int i = 0; i < n; ++i) { cin >> b[i]; c[i] -= b[i]; res += b[i]; } sort(c.rbegin(), c.rend()); for (int i = 0; i < k; ++i) { res += c[i]; } cout << res << endl; }