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.IOException;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.util.HashMap;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.InputStream;

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

class TaskE {
    private static final long BASE = 2013;
    Integer[] primes;
    int[] cnt;
    HashMap<Long, Integer> mem;

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();

        int max = Math.max(a, Math.max(b, c));
        boolean[] comp = new boolean[max + 1];
        ArrayList<Integer> primeList = new ArrayList<Integer>();

        cnt = new int[max + 2];
        for(int i = 2; i <= max; i++)
            if(!comp[i]) {
                cnt[i]++;
                primeList.add(i);
                for(int j = i * i; j <= max; j += i)
                    comp[j] = true;
            }
        for(int i = max; i >= 0; i--)
            cnt[i] += cnt[i + 1];

        primes = primeList.toArray(new Integer[primeList.size()]);

        mem = new HashMap<Long, Integer>();
        int res = go(a, b, c, 0);

        res %= (1L << 30);
        if(res < 0)
            res += (1L << 30);

        out.println(res);
    }

    private int go(int a, int b, int c, int pIdx) {
        if(a == 1 && b == 1 && c == 1)
            return 1;

        int[] aux = { a, b, c };
        Arrays.sort(aux);
        a = aux[0];
        b = aux[1];
        c = aux[2];

        long key = BASE * (BASE * (BASE * a + b) + c) + pIdx;
        if(mem.containsKey(key))
            return mem.get(key);

        int p = primes[pIdx];
        if(p > c)
            return 1;

        int ret = 0;
        if(p * p > c) {
            // c in [p, p * p)
            // a,b - not necessarily

            int na = Math.max(0, cnt[p] - cnt[a + 1]);
            int nb = Math.max(0, cnt[p] - cnt[b + 1]);
            int nc = Math.max(0, cnt[p] - cnt[c + 1]);

            ret = getNum(na, nb, nc);

//            System.out.println(a + " " + b + " " + c + " " + pIdx + " = " + ret);

            mem.put(key, ret);
            return ret;
        }

        for(int pi = 0, vi = 1; vi <= a; pi++, vi *= p)
            for(int pj = 0, vj = 1; vj <= b; pj++, vj *= p)
                for(int pk = 0, vk = 1; vk <= c; pk++, vk *= p) {
                    int ni = a / vi;
                    int nj = b / vj;
                    int nk = c / vk;

                    ret += go(ni, nj, nk, pIdx + 1) * (pi + pj + pk + 1);
                }

//        System.out.println(a + " " + b + " " + c + " " + pIdx + " = " + ret);

        mem.put(key, ret);
        return ret;
    }

    private int getNum(int na, int nb, int nc) {
        int ret = 0;

        // 3
        ret += 8 * na * (nb - 1) * (nc - 2);
        ret += 6 * na * (nb - 1); // abb
        ret += 6 * na * (nb - 1); // aba
        ret += 6 * na * (nc - 1); // aab
        ret += 4 * na; // aaa

        // 2
        ret += 4 * na * (nb - 1) + 3 * na;
        ret += 4 * na * (nc - 1) + 3 * na;
        ret += 4 * nb * (nc - 1) + 3 * nb;

        // 1
        ret += 2 * na + 2 * nb + 2 * nc;

        // 0
        ret++;

        return ret;
    }

}

class InputReader {
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

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

    public String nextString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuffer res = new StringBuffer();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));

        return res.toString();
    }

    private boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    }