
import scala.io.StdIn

object Main {
  def main(args: Array[String]): Unit = {
    val WH = StdIn.readLine().split(" ").map(_.toInt)
    val W = WH(0)
    val H = WH(1)
    val P = List.fill(W)(StdIn.readInt()).sortWith(_ < _)
    val Q = List.fill(H)(StdIn.readInt()).sortWith(_ < _)
    var w = W + 1
    var h = H + 1
    var pIndex = 0
    var qIndex = 0
    var cost = 0
    while(true) {
      val p = if (pIndex >= P.length) Int.MaxValue else P(pIndex)
      val q = if (qIndex >= Q.length) Int.MaxValue else Q(qIndex)
      if (p < q) {
        cost += p * h
        w -= 1
        pIndex+=1
      } else {
        cost += q * w
        h -= 1
        qIndex += 1
      }
      if (pIndex == W && qIndex == H) {
        println(cost)
        return
      }
    }
  }
}
