program jxfg(input,output);
type
re=record
x:boolean;
key:longint;
end;
var
m,n,i,a,xx,yy,ans:longint;
st:array[1..20002]of re;
procedure qsort(l,h:longint);
var
i,j,m:longint;
t:re;
begin
i:=l;
j:=h;
m:=st[(i+j) div 2].key;
repeat
while st[i].key>m do
inc(i);
while m>st[j].key do
dec(j);
if i<=j then
begin
t:=st[i];
st[i]:=st[j];
st[j]:=t;
inc(i);
dec(j);
end;
until i>j;
if i<h then
qsort(i,h);
if j>l then
qsort(l,j);
end;
begin
assign(input,'cut.in');
reset(input);
assign(output,'cut.out');
rewrite(output);
readln(n,m);
for i:=1 to n-1 do
begin
read(a);
st[i].key:=a;
st[i].x:=true;
end;
for i:=n to n+m-2 do
begin
read(a);
st[i].key:=a;
end;
qsort(1,n+m-2);
xx:=1;
yy:=1;
for i:=1 to n+m-2 do
if st[i].x then
begin
inc(xx);
ans:=ans+st[i].key*yy
end
else
begin
inc(yy);
ans:=ans+st[i].key*xx
end;
writeln(ans);
close(input);
close(output);
end.