#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
	int W, H, x;
	vector<pair<int, int>> P;
	cin >> W >> H;
	for (int i = 0; i < W; i++)
		cin >> x, P.push_back({x, 0});
	for (int i = 0; i < H; i++)
		cin >> x, P.push_back({x, 1});
	sort(P.begin(), P.end(), [](pair<int,int> a, pair<int,int> b) {
		return a.first < b.first;
	});
	W++, H++;
	long long r = 0;
	for (auto &p : P) {
		if (p.second)
			r += W * p.first, H--;
		else
			r += H * p.first, W--;
	}
	cout << r;
	return 0;
}
