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:

Find the sum modulo 1073741824 (2<sup class="upper-index">30</sup>).
The first line contains three space-separated integers *a*, *b* and *c* (1 ≤ *a*, *b*, *c* ≤ 2000).
from math import gcd

MAXN = 2005
MOD = 1073741824



prime = [0]*MAXN
phi  =  [0]*MAXN
mu = [0]*MAXN
res = [0]*MAXN

is_prime = [0]*MAXN;


def precom(n):
    p = 0

    for i in range(n+1):
        is_prime[i] = True
    
    is_prime[0] = is_prime[1] = False

    phi[1] = mu[1] = 1

    for i in range(2,n+1):
        if is_prime[i]:
            prime[p] = i
            p+=1
            phi[i] = i-1
            mu[i] = -1
        

        for j in range(p):
            if prime[j]*i > n :
                break

            is_prime[prime[j]*i] = False
            phi[prime[j]*i] =  phi[i]*prime[j] if (i%prime[j]!=0) else phi[i]*(prime[j]-1)
            mu[prime[j]*i] =  -mu[i] if i%prime[j] else 0
            if i%prime[j] == 0:
                break
            


def solve(x,a):
    res = 0
    #print("x is" +str(x))
    for i in range(1,x+1):
        if gcd(a,i)==1:
            res += x//i
    
    return res


if __name__ == "__main__":
    precom(2000)

    a,b,c = map(int,input().split(' '))
    ans = 0
    xx = min(b,c)
    for i in range(1,a+1):
        for j in range(1,xx+1):
            if gcd(i,j)!=1:
                continue
            else:
                #print("----------------------")
                #print(i,j,sep=" ")
                #print(mu[j])
                #print(a//i)
                #print(solve( b//j , i))
                #print(solve(c//j, i))
                ans += mu[j] * (a//i) * solve(b//j,i) * solve(c//j,i)
                #print("------------------------------")

    ans = ans%MOD
    print(ans)



