#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
 
int main(void){
	long w,h,temp,i;
	long long ans=0;
	cin >> w >> h;
	vector <pair<long,bool>> vec;
	for(i=0;i<w;i++){
		cin >> temp;
		vec.push_back( make_pair(temp,true) );
	}
	for(i=0;i<h;i++){
		cin >> temp;
		vec.push_back( make_pair(temp,false) );
	}
	sort(vec.begin(),vec.end());
	for(i=0;i<vec.size();i++){
		if(vec[i].second){
			ans+=(h+1)*vec[i].first;
			w--;
		}else{
			ans+=(w+1)*vec[i].first;
			h--;
		}
	}
	cout << ans;
	return 0;
}