#include<bits/stdc++.h>
using namespace std;
int n,m;
int money;
struct abc
{
int dj;
int fx;
}qkl[10006];
bool cmp(abc &x,abc &y)
{
return x.dj>y.dj;
}
int main()
{
scanf("%d%d",&n,&m);
for(int i=1;i<n;i++)
{
int ljj;
scanf("%d",&ljj);
qkl[i].fx=0;
qkl[i].dj=ljj;
}
for(int i=1;i<m;i++)
{
int ljj;
scanf("%d",&ljj);
qkl[i+n-1].fx=1;
qkl[i+n-1].dj=ljj;
}
int z=n+m-2;
int h=1;
int s=1;
sort(qkl+1,qkl+z+1,cmp);
for(int i=1;i<=z;i++)
{
if(qkl[i].fx==0)
{
money+=s*qkl[i].dj;
h++;
}
if(qkl[i].fx==1)
{
money+=h*qkl[i].dj;
s++;
}
}
printf("%d",money);
return 0;
}