Piegirl was asked to implement two table join operation for distributed database system, minimizing the network traffic.

Suppose she wants to join two tables, A and B. Each of them has certain number of rows which are distributed on different number of partitions. Table A is distributed on the first cluster consisting of m partitions. Partition with index i has ai rows from A. Similarly, second cluster containing table B has n partitions, i-th one having bi rows from B. 

In one network operation she can copy one row from any partition to any other partition. At the end, for each row from A and each row from B there should be a partition that has both rows. Determine the minimal number of network operations to achieve this.

Input

First line contains two integer numbers, m and n (1 ≤ m, n ≤ 105). Second line contains description of the first cluster with m space separated integers, ai (1 ≤ ai ≤ 109). Similarly, third line describes second cluster with n space separated integers, bi (1 ≤ bi ≤ 109).

Output

Print one integer — minimal number of copy operations.

Examples

Input

2 2
2 6
3 100


Output

11


Input

2 3
10 10
1 1 1


Output

6

Note

In the first example it makes sense to move all the rows to the second partition of the second cluster which is achieved in 2 + 6 + 3 = 11 operations

In the second example Piegirl can copy each row from B to the both partitions of the first cluster which needs 2·3 = 6 copy operations.
import java.io.FileNotFoundException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.File;
import java.io.Writer;
import java.util.List;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.ByteArrayOutputStream;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author abra
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB extends SimpleSavingChelperSolution {

	public void solve(int testNumber) {
		int n = in.nextInt();
		int m = in.nextInt();

		long[] a = in.nextLongArray(n);
		long[] b = in.nextLongArray(m);

		List<Long> at = new ArrayList<>();
		List<Long> bt = new ArrayList<>();
		for (Long i : a) {
			at.add(i);
		}
		for (Long i : b) {
			bt.add(i);
		}
		Collections.sort(at);
		Collections.sort(bt);
		for (int i = 0; i < a.length; i++) {
			a[i] = at.get(i);
		}
		for (int i = 0; i < b.length; i++) {
			b[i] = bt.get(i);
		}

		long ans = Long.MAX_VALUE;

		long aSum = 0;
		long bSum = 0;

		for (long i : a) {
			aSum += i;
		}
		for (long i : b) {
			bSum += i;
		}

		long bLeft = bSum;
		long prev = Long.MAX_VALUE;
		for (int i = m - 1; i >= 0; i--) {
			bLeft -= b[i];
			long t = aSum * (m - i) + bLeft;
			ans = Math.min(ans, t);
			if (prev < t) {
				break;
			}
			prev = t;
		}

		long aLeft = aSum;
		prev = Long.MAX_VALUE;
		for (int i = n - 1; i >= 0; i--) {
			aLeft -= a[i];
			long t = bSum * (n - i) + aLeft;
			ans = Math.min(ans, t);
			if (prev < t) {
				break;
			}
			prev = t;
		}

		out.println(ans);
	}
}

abstract class SimpleSavingChelperSolution extends SavingChelperSolution {

	public String processOutputPreCheck(int testNumber, String output) {
		return output;
	}

	public String processOutputPostCheck(int testNumber, String output) {
		return output;
	}
}

class InputReader {

	BufferedReader br;
	StringTokenizer in;

	public InputReader(String fileName) {
		try {
			br = new BufferedReader(new FileReader(fileName));
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

	public InputReader(InputStream inputStream) {
		br = new BufferedReader(new InputStreamReader(inputStream));
	}

	boolean hasMoreTokens() {
		while (in == null || !in.hasMoreTokens()) {
			String s = nextLine();
			if (s == null) {
				return false;
			}
			in = new StringTokenizer(s);
		}
		return true;
	}

	public String nextString() {
		return hasMoreTokens() ? in.nextToken() : null;
	}

	public String nextLine() {
		try {
			in = null; // riad legacy
			return br.readLine();
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}

	public int nextInt() {
		return Integer.parseInt(nextString());
	}

	public long nextLong() {
		return Long.parseLong(nextString());
	}

	public long[] nextLongArray(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++) {
			a[i] = nextLong();
		}
		return a;
	}

}

abstract class SavingChelperSolution {

	protected int testNumber;

	public InputReader in;
	public OutputWriter out;

	private OutputWriter toFile;

	private boolean local = new File("chelper.properties").exists();

	public OutputWriter debug = local
			? new OutputWriter(System.out)
			: new OutputWriter(new OutputStream() {
				@Override
				public void write(int b) {
				}
			});

	public SavingChelperSolution() {
		try {
			toFile = new OutputWriter("last_test_output.txt");
		} catch (FileNotFoundException e) {
			throw new RuntimeException(e);
		}
	}

	public abstract void solve(int testNumber);

	public abstract String processOutputPreCheck(int testNumber, String output);

	public abstract String processOutputPostCheck(int testNumber, String output);

	public void solve(int testNumber, InputReader in, OutputWriter out) {
		this.testNumber = testNumber;

		ByteArrayOutputStream substituteOutContents = new ByteArrayOutputStream();
		OutputWriter substituteOut = new OutputWriter(substituteOutContents);

		this.in = in;
		this.out = substituteOut;

		solve(testNumber);
		substituteOut.flush();

		String result = substituteOutContents.toString();

		result = processOutputPreCheck(testNumber, result);
		out.print(result);
		out.flush();

		if (local) {
			debug.flush();

			result = processOutputPostCheck(testNumber, result);
			toFile.print(result);
			toFile.flush();
		}
	}

}

class OutputWriter extends PrintWriter {

	public OutputWriter(String fileName) throws FileNotFoundException {
		super(fileName);
	}

	public OutputWriter(OutputStream outputStream) {
		super(outputStream);
	}

	public OutputWriter(Writer writer) {
		super(writer);
	}

}

