Problem: 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 ≤ 2000).

Output

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

Examples

Input

2 2 2


Output

20


Input

4 4 4


Output

328


Input

10 10 10


Output

11536

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.

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Objects;
import java.util.PriorityQueue;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class TaskB {

	static int[] arr;
	static boolean[] vis;

	static int ans;
	static int n;

	static int dis(int x1, int y1, int x2, int y2) {
		return (int) (((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)));
	}

	static Long memo[][];

	static long dp(int i, int k) {
		if (i == n && k == 1)
			return 1;
		if (i == n && k == 0)
			return 0;

		if (memo[i][k] != null)
			return memo[i][k];
		long c = 0;
		long nc = 0;

		if (arr[i] == 1 && k == 1) {
			return 0;
		}
		if (arr[i] == 1) {
			c = dp(i + 1, 0);
			nc = dp(i + 1, 1);
		} else if (arr[i] == 0 && k == 1) {
			c = dp(i + 1, 0);
			nc = dp(i + 1, 1);
		} else if (arr[i] == 0 && k == 0) {
			nc = dp(i + 1, 0);
		}

		return memo[i][k] = nc + c;
	}

	static int div(int n) {

		int s = 0;

		for (int i = 1; i * i <= n; i++) {
			if (n % i == 0) {
				s++;
				if (n / i != i)
					s++;
			}

		}
		arr[n] = s;
		return s;
	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();

		long sum = 0;
		int mod = 1 << 30;
		arr = new int[(int) 1e6+7];
		for (int i = 1; i <= a; i++) {
			for (int j = 1; j <= b; j++)
				for (int k = 1; k <= c; k++) {
					if (arr[i * j * k] != 0) {
						sum += arr[i * j * k];
					} else
						sum += (div(i * j * k)) % mod;
				}
		}
		pw.print(sum);
		pw.close();
	}

	static class Triple implements Comparable<Triple> {
		int x;
		int y;
		int r;

		public Triple(int x, int y, int r) {
			this.x = x;
			this.y = y;
			this.r = r;
		}

		public int compareTo(Triple o) {
			if (y == o.y)
				if (r == o.r)
					return Integer.compare(o.x, x);
				else
					return Integer.compare(r, o.r);
			return Integer.compare(y, o.y);
		}

		@Override
		public boolean equals(Object o) {
			return x == ((Triple) o).x && y == ((Triple) o).y;
		}

		public int hashCode() {
			return Objects.hash(x, y);
		}

		public String toString() {
			return x + " " + y + " " + r;
		}
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}

}