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 jdk.nashorn.internal.runtime.options.Option;

import java.math.BigInteger;
import java.text.SimpleDateFormat;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;

public class Main{

    public static Map<Integer,Map<Integer,Integer>> getFactorMap(int max)
    {
        Map<Integer,Map<Integer,Integer>> factorMap = new HashMap<>();
        for(int i=1;i<=max;i++)
        {
            Map<Integer,Integer> map = new HashMap<>();
            Boolean isPrime = true;
            for(int j=2;j<=Math.sqrt(i);j++)
            {
                if(i%j == 0)
                {
                    isPrime=false;

                    Map<Integer, Integer> primeMap = factorMap.get(j);
                    primeMap.entrySet().stream().forEach((x) -> {
                        Integer count = map.get(x.getKey());
                        if (count == null)
                        {
                            map.put(x.getKey(), x.getValue());
                        }
                        else {
                                map.put(x.getKey(), count + x.getValue());
                            }
                        });
                        j = i / j;
                    primeMap = factorMap.get(j);
                    primeMap.entrySet().stream().forEach((x) -> {
                        Integer count = map.get(x.getKey());
                        if (count == null)
                        {
                            map.put(x.getKey(), x.getValue());
                        }
                        else {
                            map.put(x.getKey(), count + x.getValue());
                        }
                    });
                    j = i / j;
                    break;
                }
            }
            if(isPrime)
            {
                map.put(i,1);
            }
            factorMap.put(i,map);
        }
        factorMap.put(1,new HashMap<>());
        return factorMap;
    }

    public static Map<Integer,Integer> addMapTogether(Map<Integer,Integer> m1,Map<Integer,Integer> m3)
    {
        Map<Integer,Integer> m2 = new HashMap<>();
        m2.putAll(m3);
        m1.keySet().stream().forEach((x)->{
            if(m2.containsKey(x))
            {
                m2.put(x,m2.get(x)+m1.get(x));
            }
            else
            {
                m2.put(x,m1.get(x));
            }
        });
        return m2;
    }


    public static void main(String args[])
    {
        int a,b,c;
        Scanner sc = new Scanner(System.in);
        a=sc.nextInt();
        b=sc.nextInt();
        c=sc.nextInt();
        int max;
        if(a>b)
        {
            if(a>c)
            {
                max=a;
            }
            else
            {
                max=c;
            }
        }
        else
        {
            if(b>c)
            {
                max=b;
            }
            else
            {
                max=c;
            }
        }
        Map<Integer,Map<Integer,Integer>> factorMap = getFactorMap(max);
        Long big=0l;
        for(int i=1;i<=a;i++)
        {
            Map<Integer,Integer> m1 = factorMap.get(i);
            for(int j=1;j<=b;j++)
            {
                Map<Integer,Integer> m2 = addMapTogether(factorMap.get(j),m1);

                for(int k=1;k<=c;k++)
                {
                    Map<Integer,Integer> m3 = addMapTogether(factorMap.get(k),m2);

                    Integer val=1;
                    if(i*k*j == 1)
                    {
                        val=1;
                    }
                    else if(m3.keySet().contains(i*k*j))
                    {
                        val=2;
                    }
                    else
                    {
                        val=m3.values().stream().reduce(1,(x,y)->{
                            return x*(y+1);
                        });
                    }

                    big+=val;
                }
            }
        }
        System.out.println(big);
    }
}
