function Main (input) {
  input = input.split("\n").map(inp => inp.split(" ").map(Number));
  var X = input[0][0];
  var Y = input[0][1];
  var p = input[1].sort((a, b) => b > a).slice(0, X);
  var q = input[2].sort((a, b) => b > a).slice(0, Y);
  var r = input[3].sort((a, b) => b > a);
  var ans = 0;
  while (true) {
    if (Math.min(p[p.length-1], q[q.length-1]) < r[0]) {
      if (p[p.length-1] > q[q.length-1]) {
        q[q.length-1] = r[0];
        r.shift();
      }
      else {
        p[p.length-1] = r[0];
        r.shift();
      }
    }
    else {
      break;
    }
  }
  for (var i of p) {
    ans += i;
  }
  for (var i of q) {
    ans += i;
  }
  console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));