Let's denote d(n) as the number of divisors of a positive integer n. You are given three integers a, b and c. Your task is to calculate the following sum:

<image>

Find the sum modulo 1073741824 (230).

Input

The first line contains three space-separated integers a, b and c (1 ≤ a, b, c ≤ 100).

Output

Print a single integer — the required sum modulo 1073741824 (230).

Examples

Input

2 2 2


Output

20


Input

5 6 7


Output

1520

Note

For the first example.

  * d(1·1·1) = d(1) = 1; 
  * d(1·1·2) = d(2) = 2; 
  * d(1·2·1) = d(2) = 2; 
  * d(1·2·2) = d(4) = 3; 
  * d(2·1·1) = d(2) = 2; 
  * d(2·1·2) = d(4) = 3; 
  * d(2·2·1) = d(4) = 3; 
  * d(2·2·2) = d(8) = 4. 



So the result is 1 + 2 + 2 + 3 + 2 + 3 + 3 + 4 = 20.
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

/**
 * Works good for CF
 * 
 * @author cykeltillsalu
 */
public class B {

	// some local config
	static boolean test = false;
	static String testDataFile = "testdata.txt";
	static String feedFile = "feed.txt";
	CompetitionType type = CompetitionType.CF;
	private static String ENDL = "\n";
	int ps[];
	   {
	       int num = (int) 1000001;
	       boolean[] isPrime = new boolean[num + 1];
	       Arrays.fill(isPrime, true);
	       isPrime[0] = isPrime[1] == false;
	       int cnt = 0;
	       for (int i = 2; i <= num; i++) {
	           int step = i, tmp = i *2;
	           if(isPrime[i]){
	               cnt ++;
	               while(tmp <= num){
	                   isPrime[tmp] = false;
	                   tmp += step;
	               }
	           }
	       }
	       ps = new int[cnt];
	       int pos = 0;
	       for (int i = 2; i < isPrime.length; i++) {
	           if(isPrime[i]){
	               ps[pos] = i;
	               pos ++;
	           }
	       }
	   }
	// solution
	private void solve() throws Throwable {
		long mod = 1073741824L;
		
//		int num = iread();
//		int[] divs = new int[num+1];
//		for (int i = 1; i < num; i++) {
//			for (int j = 1; j <= i; j++) {
//				if(i % j == 0){
//					divs[i] ++; 
//				}
//			}
//		}
		
		long cnt = 0;
		Map<Integer, Integer> values = new HashMap<Integer, Integer>();
		int a = iread(), b = iread(), c = iread();
		for (int i = 1; i <= a; i++) {
			for (int j = 1; j <= b; j++) {
				for (int k = 1; k <= c; k++) {
					int cur = i*j*k;
					if(!values.containsKey(cur)){
						values.put(cur, 0);
					}
					values.put(cur, values.get(cur)+1);
				}
			}
		}
		long retval = 0;
		for (Integer number : values.keySet()) {
			Integer t = values.get(number);
			long totcnt = 1;
			for (int i = 0; i < ps.length ; i++) {
				if(number < ps[i]){
					break;
				}
				int times = 0;
				while(number % ps[i] == 0){
					times ++;
					number /= ps[i];
				}
				totcnt *= (times+1);
				totcnt %= mod;
			}
			if(number > 1){
				totcnt *= 2;
			}
			retval += totcnt*t;
			retval %= mod;
		}
		System.out.println(retval);
		
		out.flush();
	}

	public int iread() throws Exception {
		return Integer.parseInt(wread());
	}

	public double dread() throws Exception {
		return Double.parseDouble(wread());
	}

	public long lread() throws Exception {
		return Long.parseLong(wread());
	}

	public String wread() throws IOException {
		StringBuilder b = new StringBuilder();
		int c;
		c = in.read();
		while (c >= 0 && c <= ' ')
			c = in.read();
		if (c < 0)
			return "";
		while (c > ' ') {
			b.append((char) c);
			c = in.read();
		}
		return b.toString();
	}

	public static void main(String[] args) throws Throwable {

		if (test) { // run all cases from testfile:
			BufferedReader testdataReader = new BufferedReader(new FileReader(testDataFile));
			String readLine = testdataReader.readLine();
			int casenr = 0;
			out: while (true) {
				BufferedWriter w = new BufferedWriter(new FileWriter(feedFile));
				if (!readLine.equalsIgnoreCase("input")) {
					break;
				}
				while (true) {
					readLine = testdataReader.readLine();
					if (readLine.equalsIgnoreCase("output")) {
						break;
					}
					w.write(readLine + "\n");
				}
				w.close();
				System.out.println("Answer on case " + (++casenr) + ": ");

				new B().solve();
				System.out.println("Expected answer: ");

				while (true) {
					readLine = testdataReader.readLine();

					if (readLine == null) {
						break out;
					}
					if (readLine.equalsIgnoreCase("input")) {
						break;
					}
					System.out.println(readLine);
				}
				System.out.println("----------------");
			}
			testdataReader.close();
		} else { // run on server
			new B().solve();
		}
		out.close();
	}

	public B() throws Throwable {
		if (test) {
			in = new BufferedReader(new FileReader(new File(feedFile)));
		}
	}

	InputStreamReader inp = new InputStreamReader(System.in);
	BufferedReader in = new BufferedReader(inp);
	static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));

	enum CompetitionType {
		CF, OTHER
	};
}