program cut;
var n,m,i,j,k,w:longint;
A,C:array of longint;
procedure Qsort(l,r:longint);
var i,j,x,y:longint;
begin
i:=l; j:=r; x:=A[(l+r) div 2];
repeat
while A[i]>x do inc(i);
while x>A[j] do dec(j);
if not(i>j) then
begin
y:=A[i]; A[i]:=A[j]; A[j]:=y;
y:=C[i]; C[i]:=C[j]; C[j]:=y;
inc(i); dec(j);
end;
until i>j;
if l<j then Qsort(l,j);
if i<r then Qsort(i,r);
end;
begin
assign(input,'cut.in'); reset(input);
assign(output,'cut.out'); rewrite(output);
readln(n,m);
setlength(A,n+m); setlength(C,n+m);
for i:=1 to n-1 do read(A[i]);
for i:=1 to m-1 do read(A[i+n-1]);
for i:=1 to n+m-2 do C[i]:=i;
Qsort(1,n+m-2);
i:=1; j:=1; k:=1; w:=0;
while not((i=n)and(j=m)) do
begin
if c[k]>n-1
then begin w+=i*a[k]; j+=1; end
else begin w+=j*a[k]; i+=1; end;
k+=1;
end;
writeln(w);
close(input); close(output);
end.