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.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;

public class EasyNumberChallenge {

    public void solve() {
        Scanner sc = new Scanner(System.in);
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        int i = 0, j = 0, k = 0;
        int ans = 0, sum = 0, count = 0;
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int num[] = new int[1000010];
        Arrays.fill(num, -1);
        long coun = 0;
        for (i = 1; i <= a; ++i) {
            for (j = 1; j <= b; ++j) {
                for (k = 1; k <= c; ++k) {
                    //System.out.println("i*j*k = "+i*j*k+" ans = "+numberOfDev(i*j*k));
                    if (num[i * j * k] == -1) {
                        num[i * j * k] = numberOfDev(i * j * k);
                        coun += num[i * j * k];
                    } else {
                        coun += num[i * j * k];
                    }
                }
            }
        }
       // System.out.println(coun);
        System.out.println(coun % 1073741824);

    }

    
    public static int numberOfDev2(int n) {
        int sum = 0;
        int i = 0;
        for (i = 1; i <=n/2; ++i) {
            if (n % i == 0) {
                sum += 1;
            }
        }
         sum++;
        
        return sum;
    }
    
    public static int numberOfDev(int n) {
        int sum = 0;
        int i = 0;
        for (i = 1; i <= Math.sqrt(n); ++i) {
            if (n % i == 0) {
                sum += 2;
                if(i==Math.sqrt(n)){
                    sum--;
                }
            }
             
        }
 

        return sum;
    }

    public static void main(String[] args) {
        new EasyNumberChallenge().solve();
 
    }
}
