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 (230).

The first line contains three space-separated integers a, b and c (1 ≤ a, b, c ≤ 2000).

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

from collections import Counter

def factors(n):
    fact = Counter()

    i = 2
    while i * i <= n:
        while n % i == 0:
            fact[i] += 1
            n //= i
        i += 1

    if n != 1:
        fact[n] += 1

    fact[1] = 1

    return fact

def solve(a, b, c):
    fact = {i: factors(i) for i in range(1, max(a, b, c) + 1)}

    ans = 0
    cache = {}
    for i in range(1, a+1):
        for j in range(1, b+1):
            for k in range(1, c+1):
                p = i * j * k
                if p not in cache:
                    f = fact[i] + fact[j] + fact[k]
                    f[1] = 1
                    res = 1
                    for k, v in f.items():
                        res *= v + 1

                    cache[p] = res // 2

                ans += cache[p]

    return ans % 1073741824

def main():
    a, b, c = map(int, input().split())
    ans = solve(a, b, c)
    print(ans)

if __name__ == "__main__":
    main()

from operator import mul
from functools import reduce
from collections import Counter

a, b, c = map(int, input().split())
mod = 2 ** 30

prime = [None] * 100

for i in range(2, 101):
    if prime[i - 1] is None:
        for j in range(i, 101, i):
            prime[j - 1] = i

d = {}
result = 0
for ai in range(1, a + 1):
    for bi in range(1, b + 1):
        for ci in range(1, c + 1):
            n = ai * bi * ci
            res = d.get(n)

            if res is None:
                cd = Counter()

                n_ai = ai
                while prime[n_ai - 1] is not None:
                    cd[prime[n_ai - 1]] += 1
                    n_ai //= prime[n_ai - 1]

                n_bi = bi
                while prime[n_bi - 1] is not None:
                    cd[prime[n_bi - 1]] += 1
                    n_bi //= prime[n_bi - 1]

                n_ci = ci
                while prime[n_ci - 1] is not None:
                    cd[prime[n_ci - 1]] += 1
                    n_ci //= prime[n_ci - 1]

                res = reduce(mul, map(lambda x: x + 1, cd.values()), 1)
                d[n] = res

            result += res

print(result % mod)

import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy

ORDA = 97  # a
def ii(): return int(input())
def mi(): return map(int, input().split())
def li(): return [int(i) for i in input().split()]
def lcm(a, b): return abs(a * b) // math.gcd(a, b)
def revn(n): return str(n)[::-1]
def dd(): return collections.defaultdict(int)
def ddl(): return collections.defaultdict(list)
def sieve(n):
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r
def divs(n, start=2):
    r = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if (n % i == 0):
            if (n / i == i):
                r.append(i)
            else:
                r.extend([i, n // i])
    return r
def divn(n, primes):
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t
def prime(n):
    if n == 2: return True
    if n % 2 == 0 or n <= 1: return False
    sqr = int(math.sqrt(n)) + 1
    for d in range(3, sqr, 2):
        if n % d == 0: return False
    return True
def convn(number, base):
    new_number = 0
    while number > 0:
        new_number += number % base
        number //= base
    return new_number
def cdiv(n, k): return n // k + (n % k != 0)
def ispal(s): # Palindrome
    for i in range(len(s) // 2 + 1):
        if s[i] != s[-i - 1]:
            return False
    return True
# a = [1,2,3,4,5] -----> print(*a) ----> list print krne ka new way

rr = sieve(100)

def d(n):
	res = 1
	r = rr
	for i in rr:
		cnt = 1
		if i > n:
			return res
		while n%i == 0:
			n //= i
			cnt += 1
		res *= cnt
	return res

def main():
	a,b,c = mi()
	res = 0
	for i in range(1,a+1,1):
		for j in range(1,b+1,1):
			for k in  range(1,c+1,1):
				res += d(i*j*k)%1073741824
	print(res)

main()

import math
res = 0
a,b,c = map(int,input().split())
arr = [0]*1000001
for i in range(1,a+1):
    for j in range(1,b+1):
        for k in range(1,c+1):
            num = i*j*k
            count = 0
            if arr[num]:
                res += arr[num]
            else:
                for l in range(1,math.floor((num)**(1/2))+1):
                    if num % l == 0:
                        if num // l != l:
                            count += 2
                        else:
                            count += 1
                res += count
                arr[num] = count
print(res%(2**30))

#coding: utf8
import math
import copy
import sys
import itertools

def printe(inp):
    sys.stderr.write(repr(inp)+'\n')
    #sys.stderr.flush()

def primes(n):
    """http://code.activestate.com/recipes/366178-a-fast-prime-number-list-generator/"""
    if n==2: return [2]
    elif n<2: return []
    s=range(3,n+1,2)
    mroot = n ** 0.5
    i_half=(n+1)/2-1
    i=0
    m=3
    while m <= mroot:
        if s[i]:
            j=(m*m-3)/2
            s[j]=0
            while j<i_half:
                s[j]=0
                j+=m
        i=i+1
        m=2*i+3
    return [2]+[x for x in s if x]

def div(k, l_p):
    if k<=1:
        return []
    ans = []
    for p in l_p:
        if k%p==0:
            ans.append(p)
            k/= p

            while k%p==0 :
                ans.append(p)
                k/= p

            if k==1:
                return ans
    ans.append(k)
    return ans

def count(divs):
    if len(divs)==0:
        return 1

    s = set(divs)

    ans = 1
    for i in s:
        ans *= (divs.count(i)+1)

    return ans

def readline():
    return map(int, raw_input().split())

def solve():
    l_p = primes(11)
    l_div = [div(_, l_p) for _ in range( 101)]
    #printe(l_div)

    t = readline()
    t.sort()

    d = {}
    N = max(t)
    p_comb = itertools.combinations_with_replacement(range(1, N+1), 3)
    for a,b,c in p_comb:
        divs = l_div[a]+l_div[b]+l_div[c]
        n = count(divs)
        d[(a,b,c)] = n

    ans = 0
    a,b,c = t
    for i in range(1, a+1):
        for j in range(1, b+1):
            for k in range(1, c+1):
                l = [i,j,k]
                l.sort()
                ans += d[tuple(l)]

    print ans
    return 0

if __name__ == '__main__':
    solve()

from collections import defaultdict

def divisorGenerator(n):
    large_divisors = []
    for i in range(1, int((n ** 0.5) + 1)):
        if n % i == 0:
            yield i
            if i * i != n:
                large_divisors.append(n / i)
    for divisor in reversed(large_divisors):
        yield divisor

a, b, c = map(int, input().split())
number_of_divisors = defaultdict()
result = 0

for i in range(1, a + 1):
    for j in range(1, b + 1):
        for k in range(1, c + 1):
            x = i * j * k
            if x in number_of_divisors:
                d = number_of_divisors[x]
            else:
                d = len(list(divisorGenerator(x)))
                number_of_divisors[x] = d
            result = (result + d) % 1073741824

print(result)

import operator as op
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from functools import reduce
from itertools import (
    accumulate, combinations, combinations_with_replacement, groupby,
    permutations, product)
from math import (acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot,
                  log2, pi, radians, sin, sqrt, tan)
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
    return(int(input()))

def inlist():
    return(list(map(int, input().split())))

def instr():
    s = input()
    return(list(s[:len(s)]))

def invr():
    return(map(int, input().split()))

def def_value():
    return 0

def nod(n):
    temp = n
    if dp[temp] > 0:
        return dp[temp]
    limit = int(sqrt(n)) + 1
    res = 1
    for i in range(2, limit+1):
        a = 0
        while n % i == 0:
            n //= i
            a += 1
        res *= (a + 1)
    if n > 1:
        res *= 2
    dp[temp] = res
    return dp[temp]

a, b, c = invr()
mod = 1073741824
dp = [0] * ((a*b*c)+1)

tot = 0

for i in range(1, a+1):
    for j in range(1, b+1):
        for k in range(1, c+1):
            tot += nod(i*j*k) % mod

print(tot)

a, b, c = map(int, input().split())
primes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97]
def d(x):
    ans=1
    for i in primes:
        if x<i:
            break
        power=0
        while x%i==0 and x>=i:
            x=x//i
            power+=1
        ans *= (power+1)
    return ans

dlist = [0]*(a*b*c+1)

ans = 0
for i in range(1, a+1):
    for j in range(1, b+1):
        for k in range(1, c+1):
            if dlist[i*j*k]==0:
                dlist[i*j*k] = d(i*j*k)
            ans += dlist[i*j*k]
print(ans)

pr=[1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]
cd = {}
def d(n):
    if n in cd:
        return cd[n]
    t,i=1,2
    k=n

    while i * i <= k:
        if k % i == 0:
            k /= i
            c = 2
            while k % i == 0:
                k /= i
                c += 1
            t *= c
        i += 1
    if k > 1:
        t *= 2
    cd[n] = t
    return t
i,j,m=map(int, raw_input().split())
r=0
for x in xrange(1,i+1):
    for y in xrange(1, j+1):
        for z in xrange(1, m+1):
            #l=len(set(a*s*w for a in d(x) for s in d(y) for w in d(z)))
            #
            #print len(d(x)|d(y)|d(z))
            r += d(x*y*z)
print r%1073741824

a,b,c = map(int,input().split())
lis=[0]*(1000001)
for i in range(1,1000001):
    j=i
    while j<=1000000:
        lis[j]+=1
        j+=i
ans=0
for i in range(1,a+1):
    for j in range(1,b+1):
        for k in range(1,c+1):
            ans+=(lis[i*j*k]%1073741824)
print(ans)

from functools import reduce
from collections import Counter
import time
import datetime

def time_t():
    print("Current date and time: " , datetime.datetime.now())
    print("Current year: ", datetime.date.today().strftime("%Y"))
    print("Month of year: ", datetime.date.today().strftime("%B"))
    print("Week number of the year: ", datetime.date.today().strftime("%W"))
    print("Weekday of the week: ", datetime.date.today().strftime("%w"))
    print("Day of year: ", datetime.date.today().strftime("%j"))
    print("Day of the month : ", datetime.date.today().strftime("%d"))
    print("Day of week: ", datetime.date.today().strftime("%A"))

def ip():
    return int(input())

def sip():
    return input()

def mip():
    return map(int,input().split())

def mips():
    return map(str,input().split())

def lip():
    return list(map(int,input().split()))

def matip(n,m):
    lst=[]
    for i in range(n):
        arr = lip()
        lst.append(arr)
    return lst

def factors(n): # find the factors of a number
    return list(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))

def minJumps(arr, n): #to reach from 0 to n-1 in the array in minimum steps
    jumps = [0 for i in range(n)]
    if (n == 0) or (arr[0] == 0):
        return float('inf')
    jumps[0] = 0
    for i in range(1, n):
        jumps[i] = float('inf')
        for j in range(i):
            if (i <= j + arr[j]) and (jumps[j] != float('inf')):
                jumps[i] = min(jumps[i], jumps[j] + 1)
                break
    return jumps[n-1]

def dic(arr): # converting list into dict of count
    return Counter(arr)

def prime(n):
    for i in range(3,int(n**(0.5))+1):
        if n%i==0:
            return False
    return True

primes = []
for i in range(2,101):
    if prime(i):
        primes.append(i)

a,b,c = mip()
count = 0
if a==1 and b==1 and c==1:
    print(1)
else:
    for i in range(1,a+1):
        for j in range(1,b+1):
            for k in range(1,c+1):
                q = i*j*k
                ans = 1
                for item in primes:
                    if q<item:
                        break
                    y = 1
                    while q%item==0 and q>=1:
                        q = q//item
                        y+=1
                    ans = ans*y
                count += ans
    print(count)

MOD = 1073741824

def findPrimeFact(n):
    fact = {}
    count = 0
    while(n%2 == 0):
        count += 1
        n //= 2
    if count:
        fact[2] = count
    for i in range(3, int(n**0.5)+1, 2):
        count = 0
        while n%i ==0:
            count += 1
            n //= i
        if count:
            fact[i] = count
    if n>2:
        fact[n] = 1
    return(fact)

a, b, c = map(int, input().split())
ans = 0
for i in range(1, a+1):
    for j in range(1, b+1):
        for k in range(1, c+1):
            fact = findPrimeFact(i*j*k)
            temp = 1
            for l in fact:
                temp *= (1+fact[l])
                temp %= MOD
            ans += temp
            ans %= MOD

print(ans%MOD)

import math

divisores = {}

def countDivisors(n) :
  if n in divisores:
    return divisores[n]
  else:
    cnt = 0
    for i in range(1, (int)(math.sqrt(n)) + 1) :
        if (n % i == 0) :

            # If divisors are equal,
            # count only one
            if (n / i == i) :
                cnt = cnt + 1
            else : # Otherwise count both
                cnt = cnt + 2
    divisores[n] = cnt
    return cnt

a,b,c = list(map(int, input().split(" ")))

ult_a = 1
ult_b = 1
ult_c = 1

soma = 0

for i in range(a*b*c):
  ult_c = (i % c) + 1
  if (i % c) == 0:
    ult_b = (ult_b % b) + 1
  if (i % (b*c)) == 0:
    ult_a = (ult_a % a) + 1
  numero = ult_a*ult_b*ult_c
  numero = countDivisors(numero)
  soma = (soma%1073741824) + numero

print(soma%1073741824)

d = {}

def gd(n):
    s, f, p, t = 2, {}, 1, n
    while n!=1:
        if n%s == 0:
            n = n/s
            f[s] = f.get(s,0)+1
            s = 2
        else:
            s+=1
    values = f.values()
    for x in values:
        p*=(x+1)
    d[t] = p
    return p

result = 0
x, y, z = map(int,raw_input().split())
import datetime
st = datetime.datetime.now()
for i in range(1,x+1):
    for j in range(1,y+1):
        for k in range(1,z+1):
            t = i*j*k
            r = d.get(t,None)
            if r is None:
                result+=gd(t)
            else:
                result+=r
print result%1073741824

def main():
    from itertools import product
    a, b, c = sorted(map(int, input().split()))
    primes = (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97)
    l = [None]
    for x in range(1, (c + 1)):
        tmp = [0] * 25
        for i, p in enumerate(primes):
            while not x % p:
                x //= p
                tmp[i] += 1
        l.append(tuple(tmp))
    res = 0
    cache = {}
    for x, y, z in product(range(1, a + 1), range(1, b + 1), range(1, c + 1)):
        xyz = x * y * z
        if xyz in cache:
            res += cache[xyz]
        else:
            u = 1
            for t in map(sum, zip(l[x], l[y], l[z])):
                if t:
                    u *= t + 1
            u &= 1073741823
            cache[xyz] = u
            res += u
    print(res & 1073741823)

if __name__ == '__main__':
    main()

l=lambda:map(int,raw_input().split())
p = [2]
p+=[i for i in range(3,100,2) if all(i%m for m in p)]
d={1:1,2:2,3:2}
def f(x):
    if x not in d:
        t=x
        s=1
        for m in p:
            if m>t: break
            q=1
            while t%m==0:
                q+=1
                t/=m
            s*=q
        d[x]=s
    return d[x]
a,b,c=l()
print sum(f(i*j*k) for i in range(1,a+1) for j in range(1,b+1) for k in range(1,c+1))

import sys
import itertools
import math
import collections
from collections import Counter

#input = sys.stdin.readline

#########################
# imgur.com/Pkt7iIf.png #
#########################

def sieve(n):
    prime = [True for i in range(n + 1)]
    p = 2
    while (p * p <= n):
        if (prime[p] == True):
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 1
    prime[0] = prime[1] = False
    r = [p for p in range(n + 1) if prime[p]]
    return r
def divs(n, start=1):
    r = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if (n % i == 0):
            if (n / i == i):
                r.append(i)
            else:
                r.extend([i, n // i])
    return r

def flin(d, x, default = -1):
    f = l = -1
    for i in range(len(d)):
        if d[i] == x:
            if f == -1: f = i
            l = i
    if f == -1:
        return (default, default)
    else:
        return (f, l)
def ceil(n, k): return n // k + (n % k != 0)
def ii(): return int(input())
def mi(): return map(int, input().split())
def li(): return list(map(int, input().split()))
def lcm(a, b): return abs(a * b) // math.gcd(a, b)
def prr(a, sep=' '): print(sep.join(map(str, a)))
def dd(): return collections.defaultdict(int)

pr = sieve(10**6 // 2)
def divn(n):
    res = 1
    for i in pr:
        if n == 1:
            return res

        t = 1
        while n % i == 0:
            t += 1
            n = n//i
        res *= t

a, b, c = mi()
mem = [0]*(10**6 + 1)
res = 0
for i in range(1, a + 1):
    for j in range(1, b + 1):
        for k in range(1, c + 1):
            n = i * j * k
            if mem[n] == 0: mem[n] = divn(i * j * k)
            res += mem[n]
print(res % 1073741824)

d=[0]*1000005
for i in range(1,1000001):
    for j in range(1,1000001):
        if i*j>1000001:break
        else:d[i*j]+=1
a,b,c=map(int,input().split());ans=0
for i in range(1,a+1):
    for j in range(1,b+1):
        for k in range(1,c+1):
            ans+=d[i*j*k]
print(ans)

I=lambda:map(int, raw_input().split())
dp = {}
MOD = 1073741824
def d(x):
    if x in dp:
        return dp[x]
    res = 1
    q = 2
    xx = x
    while q * q <= x:
        r = 1
        while x % q == 0:
            x /= q
            r += 1
        res = (res * r) % MOD
        q += 1
    if x > 1:
        res = (res * 2) % MOD
    dp[xx] = res
    return res
a, b, c = I()

res = 0
for i in xrange(1, a + 1):
    for j in xrange(1, b + 1):
        for k in xrange(1, c + 1):
            res = (res + d(i * j * k)) % MOD
print res

from math import *
def div(x):
    s=0
    for i in range(2,floor(sqrt(x))+1):
        if x%i==0:s+=1
        if x%(x//i)==0 and i!=x//i:s+=1
    if x==1:return s+1
    return s+2
d=[-1]*(1000001)
a,b,c=map(int,input().split());ans=0
for i in range(1,a+1):
    for j in range(1,b+1):
        for k in range(1,c+1):
            if d[i*j*k]==-1:d[i*j*k]=div(i*j*k)
            ans=(ans+d[i*j*k])
print(ans)

"""
    This template is made by Satwik_Tiwari.
    python programmers can use this template :)) .
"""

#===============================================================================================
#importing some useful libraries.

import sys
import bisect
import heapq
from math import *
from collections import Counter as counter  # Counter(list)  return a dict with {key: count}
from itertools import combinations as comb # if a = [1,2,3] then print(list(comb(a,2))) -----> [(1, 2), (1, 3), (2, 3)]
from itertools import permutations as permutate
from bisect import bisect_left as bl #
from bisect import bisect_right as br
from bisect import bisect

#===============================================================================================
#some shortcuts

mod = pow(10, 9) + 7
def inp(): return sys.stdin.readline().strip() #for fast input
def out(var): sys.stdout.write(str(var))  #for fast output, always take string
def lis(): return list(map(int, inp().split()))
def stringlis(): return list(map(str, inp().split()))
def sep(): return map(int, inp().split())
def strsep(): return map(str, inp().split())
def graph(vertex): return [[] for i in range(0,vertex+1)]
def zerolist(n): return [0]*n
def nextline(): out("\n")  #as stdout.write always print sring.
def testcase(t):
    for p in range(t):
        solve()
def printlist(a) :
    for p in range(0,len(a)):
        out(str(a[p]) + ' ')
def lcm(a,b): return (a*b)//gcd(a,b)

#===============================================================================================
# code here ;))

def solve():
    a,b,c = sep()
    dp = [0]*((a*b*c)+1)
    for i in range(1,(a*b*c)+1):
        j = 1
        while((i*j) <= (a*b*c)):
            dp[i*j] +=1
            j+=1
    # print(dp)

    ans = 0
    for i in range(1,a+1):
        for j in range(1,b+1):
            for k in range(1,c+1):
                ans += dp[i*j*k]
    print(ans%1073741824)

testcase(1)

a,b,c=input().split()
a,b,c=[int(a),int(b),int(c)]
s=0
d=[0]*(1000001)
for i in range(1,1000001):
    j=i
    while j<=1000000:
        d[j]+=1
        j+=i
for i in range(1,a+1):
    for j in range(1,b+1):
        for k in range(1,c+1):
            p=(i*j*k)
            s+=d[p]
print(s)

a,b,c=map(int,input().split())
M=1073741824
n=a*b*c
d=[1]*(n+1)
for i in range(2,n+1):
	for j in range(i,n+1,i):
	    d[j]+=1
r=0
for i in range(1,a+1):
	for j in range(1,b+1):
		for k in range(1,c+1):
			r+=(d[i*j*k])%M
print(r%M)

import sys
INF = 10**20
MOD = 10**9 + 7
I = lambda:list(map(int,input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br

"""
Facts and Data representation
Constructive? Top bottom up down
"""
a, b, c = I()
MOD = 2 ** 30
ans = 0

primes = []
for i in range(2, 100):
  for j in range(2, i):
    if i % j == 0:
      break
  else:
    primes.append(i)

for i in range(1, a + 1):
  for j in range(1, b + 1):
    for k in range(1, c + 1):
      ok = i * j * k
      res = 1
      for p in primes:
        cnt = 0
        while ok % p == 0:
          ok //= p
          cnt += 1
        res *= (cnt + 1)
      ans += res
      ans %= MOD

print(ans)

def gen_primes(n):
    ret = [2]
    if n < 3:
        return ret
    n += 1
    buf = [0] * n
    buf[2] = 1
    for i in xrange(3, n, 2):
        if buf[i] == 0:
            ret.extend([i])
            for j in xrange(2 * i, n, i):
                buf[j] = 1
    return ret
def count_divisor(n, primes):
    ret = 1
    for p in primes:
        if n < p:
            break
        cnt = 1
        while n % p == 0:
            cnt += 1
            n /= p
        ret *= cnt
    return ret
def main():
    p = gen_primes(1000000)
    a, b, c = map(int, raw_input().split())
    a, b, c, ans = a + 1, b + 1, c + 1, 0
    buf = [1] * (a * b * c)
    for ai in xrange(1, a):
        for bi in xrange(1, b):
            for ci in xrange(1, c):
                i = ai * bi * ci
                if buf[i] == 1 and i > 1:
                    buf[i] = count_divisor(i, p)
                ans += buf[i]
    print ans
if __name__ == '__main__':
    main()

a,b,c=[int(x) for x in input().split(' ')]
mod=1073741824
divisors=[1]*1000001
for x in range(2,1000001):
	for y in range(x,1000001,x):
		divisors[y]+=1
ans=0
for i in range(1,a+1):
	for j in range(1,b+1):
		for k in range(1,c+1):
			ans+=(divisors[i*j*k])%mod
print(ans%mod)

# -*- coding: utf-8 -*-

from __future__ import division
from __future__ import print_function
from _ast import operator
from future_builtins import *

import bisect
import collections
import copy
import functools
import heapq
import itertools
import math
import operator
import os
import re
import random
import sys
import unittest
from pprint import pprint
from StringIO import StringIO

__author__ = 'Aphrodite'

class Prime(object):
    def __init__(self, n):
        '''build prime numbers in range [0..n]'''
        self._prime = [False, False] + [True] * (n - 1)
        for i in range(2, int(n ** 0.5) + 1):
            if self._prime[i]:
                for j in range(i * i, n + 1, i):
                    self._prime[j] = False

    def is_prime(self, x):
        '''check if x is prime'''
        return self._prime[x]

    def get_all_primes(self):
        '''get prime numbers less or equal then n'''
        return [idx for idx, value in enumerate(self._prime) if value]

    def get_primes(self, m):
        '''get prime numbers less or equal then m'''
        return [idx for idx, value in enumerate(self._prime[:m + 1]) if value]

    def get_prime_expression(self, m):
        '''m = p1^k1 * p2^k2 * p3^k3
           return [(p1, k1), (p2, k2), (p3, k3)]
        '''
        res = []
        for x in self.get_primes(m):
            if m % x == 0:
                aux, cnt = m, 0
                while aux % x == 0:
                    aux //= x
                    cnt += 1
                res.append((x, cnt))
        return res

def memo(func):
    cache = {}
    @functools.wraps(func)
    def _memo(*args):
        if args not in cache:
            cache[args] = func(*args)
        return cache[args]
    return _memo

@memo
def func(n, p):
    expression = p.get_prime_expression(n)
    if not expression:
        return 1
    return reduce(lambda a, b: a * b, (q + 1 for p, q in expression))

def main():
    iterator = itertools.imap(str.rstrip, sys.stdin.readlines())
    a, b, c = map(int, next(iterator).split())
    p = Prime(100)
    res = 0
    for i in range(1, a + 1):
        for j in range(1, b + 1):
            for k in range(1, c + 1):
                res = (res + func(i * j * k, p)) % 1073741824
    print(res)

if __name__ == '__main__':
    main()

def primes1(n):
    """ Returns  a list of primes < n """
    sieve = [True] * (n//2)
    for i in range(3,int(n**0.5)+1,2):
        if sieve[i//2]:
            sieve[i*i//2::i] = [False] * ((n-i*i-1)//(2*i)+1)
    return [2] + [2*i+1 for i in range(1,n//2) if sieve[i]]

def d(x):
    y=0
    ans=1
    for i in primes_list:
        if x < i:
            break
        y=1
        while x%i==0 and x>= i:
            x/=i
            y+=1
        ans*=y
    return ans

primes_list = primes1(100)
x = 0
t = {}
a, b, c = list(map(int, input().split()))
s = []
for i in range(1, a+1):
    for j in range(1, b+1):
        for k in range(1, c+1):
            q = i * j * k
            if q not in t:
                t[q] = d(q)
            x += t[q]
print(x % 1073741824)

primes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97]
def fun(x):
    cnt=0
    ans=1
    for i in primes:
        if x<i:
            break
        cnt=1
        while x%i==0 and x>=i:
            x=x//i
            cnt+=1
        ans*=cnt
    return ans
a,b,c=map(int,input().split())
res=0
dic=dict()
for i in range(1,a+1):
    for j in range(1,b+1):
        for k in range(1,c+1):
            if i*j*k not in dic.keys():
                dic[i*j*k]=fun(i*j*k)
            res+=dic[i*j*k]
print(res%1073741824)

def mergeDict(a, b, c):
    ret = a.copy()
    for key, value in b.items():
        if ret.has_key(key):
            ret[key] += value
        else:
            ret[key] = value

    for key, value in c.items():
        if ret.has_key(key):
            ret[key] += value
        else:
            ret[key] = value
    return ret

isPrime = [True for i in range(101)]
for i in range(2, 101):
    if isPrime[i] is True:
        for j in range(i + i, 101, i):
            isPrime[j] = False
primeList = [i for i in range(2, 101) if isPrime[i] is True]

decomposition = [None] * 101
decomposition[1] = {2:0} # special workaround
for prime in primeList:
    decomposition[prime] = {prime : 1}
    for i in range(2, 101):
        if decomposition[i] is not None and i * prime < 101:
            decomposition[i * prime] = decomposition[i].copy()
            if prime not in decomposition[i * prime].keys():
                decomposition[i * prime][prime] = 1
            else:
                decomposition[i * prime][prime] += 1

a, b, c = map(int, raw_input().split())
hashTable = {}
ans = 0
for ai in range(1, a+1):
    for bi in range(1, b+1):
        for ci in range(1, c+1):
            d = ai * bi * ci
            if hashTable.has_key(d):
                ans += hashTable[d]
            else:
                merge = mergeDict(decomposition[ai], decomposition[bi], decomposition[ci])
                num = reduce(lambda x, y: x*y, map(lambda x: x+1, merge.values()))
                ans += num
                hashTable[d] = num
            ans %= 1073741824

print ans

def d(x):
    if x == 1:
        return 1

    k = 0
    i = 1

    while i * i <= x:
        if x % i == 0:
            k += 2
            if i * i == x:
                k -= 1
        i += 1

    return k

a, b, c = map(int, input().split())
n = 1073741824

ans = 0
s = [0 for i in range(1000001)]

for x in range(1, a + 1):
    for y in range(1, b + 1):
        for z in range(1, c + 1):
            p = x * y * z
            if s[p] == 0:
                s[p] = d(p)
            ans = (ans + s[p]) % n

print(ans)

lst=[1]*1000001
for i in range(2,1000001):
     j=i
     while j<=1000000:
         lst[j]+=1
         j+=i
z=list(map(int,input().split()))
ans=0
for i in range(1,z[0]+1):
    for j in range(1,z[1]+1):
        for k in range(1,z[2]+1):
             ans+=lst[i*j*k]
print(ans)

MOD = 1073741824
(a, b, c) = map(int, input().split(' '))

maxProd = a * b * c
d = [0 for i in range(maxProd + 1)]
d[1] = 1

for i in range(2, maxProd + 1):
    d[i] = 2

for i in range(2, maxProd//2 + 1):
    for j in range(2 * i, maxProd + 1, i):
        d[j] += 1

ret = 0
for i in range(1, a + 1):
    for j in range(1, b + 1):
        for k in range(1, c + 1):
            ret = (ret + d[i * j * k]) % MOD

print(ret)

a, b, c = map(int, input().split())

def count_div(x):
	count = 2

	for i in range(2, int(x**0.5)+1):
		if not x%i:
			if i*i != x:
				count += 2
			else:
				count += 1
	return count

k = 10**5
d = [0 for i in range(10**6+1)]
d[1] = 1; d[2] = 2; d[3] = 2

N = 2**30
ans = 0

for i in range(1, a+1):
	for j in range(1, b+1):
		for k in range(1, c+1):
			if not d[i*j*k]:
				d[i*j*k] = count_div(i*j*k)

			ans = (ans + d[i*j*k])%N
print(ans)

from sys import *
input=stdin.readline
x,y,z=map(int,input().split())
l=[1]*(1000001)
for i in range(2,1000001):
    for j in range(i,1000001,i):
        l[j]+=1
c=0
for i in range(1,x+1):
    for j in range(1,y+1):
        for k in range(1,z+1):
            c+=l[i*j*k]
print(c%(1073741824))

a,b,c = map(int,input().split())
li = a*b*c +1
d = [1]*li
for i in range(2,li):
    for j in range(i,li,i):
        d[j]+=1

ans = 0
for i in range(1,a+1):
    for j in range(1,b+1):
        for k in range(1,c+1):
            ans += d[i*j*k]

print(ans)

a,b,c=[int(x) for x in input().split(' ')]
mod=1073741824
divisors=[1]*1000001
for x in range(2,1000001):
	for y in range(x,1000001,x):
		divisors[y]+=1
ans=0
for i in range(1,a+1):
	for j in range(1,b+1):
		for k in range(1,c+1):
			ans+=(divisors[i*j*k])%mod
print(ans%mod)

def inp():
    return map(int, stdin.readline().split())

def factorize(n):  # o(sqr(n))
    c, ans = 1, 0
    while (c * c < n):
        if n % c == 0:
            ans += 2
        c += 1

    if c * c == n:
        ans += 1
    return ans

from sys import *
from collections import *

a, b, c = inp()
mem, ans = defaultdict(int), 0

for i in range(1, a + 1):
    for j in range(1, b + 1):
        for k in range(1, c + 1):
            pro = i * j * k
            if mem[pro] == 0:
                mem[pro] = factorize(pro)
            ans += mem[pro]
print(ans)

def dic(n):
    i=2
    f=1
    t=0
    while i*i<=n:

        while n%i==0:
            t+=1
            n//=i

        f=f*(t+1)
        t=0
        if i==2:
            i=3
        else:
            i+=2
    if n>1:
        f*=2

    return f

a,b,c=map(int,input().split())
d=dict()
a+=1
b+=1
c+=1
g=0
for i in range(1,a):
    for j in range(1,b):
        for z in range(1,c):
            ans=dic(i*j*z)

            g+=ans

print(g)

import math as m
a, b, c=map(int, input().split())
ans=0
def div(num):
    t=0
    for i in range(1, int(m.sqrt(num)) + 1):
        if num%i==0:
            t+=1
            if num//i!=i:
                t+=1
    return t
dic={}
for i in range(1, a+1):
    for j in range(1, b+1):
        for k in range(1, c+1):
            a=i*j*k
            if a in dic:
                ans=(ans+dic[a])%1073741824
            else:
                dic[a]=div(a)
                ans=(ans+dic[a])%1073741824
print(ans)

a, b, c = map(int, raw_input().split())
d, r = {}, 0
for x in [(i + 1) * (j + 1) * (k + 1) for i in range(a) for j in range(b) for k in range(c)]:
	d[x] = d.get(x, 0) + 1
for k, v in d.items():
	t, i = 1, 2
	while i * i <= k:
		if k % i == 0:
			k /= i
			c = 2
			while k % i == 0:
				k /= i
				c += 1
			t *= c
		i += 1
	if k > 1:
		t *= 2
	r = (r + t * v) & 1073741823
print r

mod = (1 << 30)
memo = dict()

def dp(x):
	if x in memo:
		return memo[x]
	res, q, t = 1, 2, x
	while q * q <= x:
		r = 1
		while x % q == 0:
			x /= q
			r += 1
		res = (res * r) % mod
		q += 1
	if x > 1:
		res = (res * 2) % mod
	memo[t] = res
	return res

a, b, c = sorted(map(int, input().split()))
res = 0
for i in range(1, a+1):
	for j in range(1, b+1):
		for k in range(1, c+1):
			res = (res + dp(i * j * k)) % mod
print(res)

import sys
import time
import math
from functools import lru_cache

INF = 10 ** 18 + 3
EPS = 1e-10
MAX_CACHE = 10 ** 9

MOD = 1 << 30

# Decorators
def time_it(function, output=sys.stderr):
    def wrapped(*args, **kwargs):
        start = time.time()
        res = function(*args, **kwargs)
        elapsed_time = time.time() - start
        print('"%s" took %f ms' % (function.__name__, elapsed_time * 1000),
              file=output)
        return res

    return wrapped

@lru_cache(MAX_CACHE)
def calc_prime_divs(n):
    if n == 1:
        return ()
    sieve = [True] * (n // 2)
    for i in range(3, int(n ** 0.5) + 1, 2):
        if sieve[i // 2]:
            sieve[i * i // 2::i] = [False] * ((n - i * i - 1) // (2 * i) + 1)
    return (2,) + tuple(2 * i + 1 for i in range(1, n // 2) if sieve[i])

divisors = calc_prime_divs(100**3)

@lru_cache(MAX_CACHE)
def calc_num_of_divs(n):
    if n == 1:
        return 1

    k = 1
    for div in divisors:
        if n < div:
            return 2
        while n % div == 0:
            k += 1
            n //= div
        if k > 1:
            return k * calc_num_of_divs(n)

@time_it
def main():
    a, b, c = map(int, input().split())
    print(sum(calc_num_of_divs(i * j * k) % MOD
              for i in range(a, 0, -1)
              for j in range(b, 0, -1)
              for k in range(c, 0, -1)))

def set_input(file):
    global input
    input = lambda: file.readline().strip()

def set_output(file):
    global print
    local_print = print

    def print(*args, **kwargs):
        kwargs["file"] = kwargs.get("file", file)
        return local_print(*args, **kwargs)

if __name__ == '__main__':
    set_input(open("input.txt", "r") if "MINE" in sys.argv else sys.stdin)
    set_output(sys.stdout)
    main()

a, b, c = map(int, input().split())
d = [0] * 1000010

for i in range(1, (a*b*c) + 1):
    for j in range(i, (a*b*c) + 1, i):
        d[j] += 1
sum_n = 0

for i in range(1, a + 1):
    for j in range(1, b + 1):
        for k in range(1, c + 1):
            sum_n = (sum_n + d[i*j*k])
print(sum_n % 1073741824)

a,b,c=map(int,input().split())
M=1073741824
n=a*b*c
d=[1]*(n+1)
for i in range(2,n+1):
	for j in range(i,n+1,i):
	    d[j]+=1
r=0
for i in range(1,a+1):
	for j in range(1,b+1):
		for k in range(1,c+1):
			r+=(d[i*j*k])%M
print(r%M)

import math
import itertools
import operator

primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29,
          31, 37, 41, 43, 47, 53, 59, 61, 67, 71,
          73, 79, 83, 89, 97]

def get_prime_mult(n):
    m = [0] * 25
    if n < 2:
        return m
    sq = int(math.sqrt(n))
    p = 0
    while primes[p] <= sq:
        if n % primes[p] != 0:
            p += 1
        else:
            m[p] += 1
            n //= primes[p]
            sq = int(math.sqrt(n))

    m[primes.index(n)] += 1
    return m

a, b, c = map(int, input().split())
mtab = []
for i in range(max((a, b, c)) + 1):
    mtab.append(get_prime_mult(i))

total = 0
mults_cnt = {}
for i in range(1, a + 1):
    for j in range(1, b + 1):
        for k in range(1, c + 1):
            if i * j * k not in mults_cnt:
                mults = [sum(triple) + 1 for triple in zip(mtab[i], mtab[j], mtab[k])]
                mults_cnt[i * j * k] = list(itertools.accumulate(mults, operator.mul))[-1]
            total += mults_cnt[i * j * k]

print(total & 0x3FFFFFFF)

# https://codeforces.com/problemset/problem/236/B

"""
d(n) denotes the number of divisors a number has
"""

a, b, c = map(int, input().split())

limit = a*b*c + 1
d = [1] * limit
for i in range(2, limit):
    for j in range(i, limit, i):
        d[j] += 1

answer = 0
for i in range(1, a+1):
    for j in range(1, b+1):
        for k in range(1, c+1):
            answer += d[i*j*k]

print(answer % 1073741824)

import sys
input = lambda: sys.stdin.readline().strip("\r\n")
import math

def countDivisors(n):
    cnt = 0
    for i in range(1, (int(math.sqrt(n))) + 1):
        if n % i == 0:
            if int(n / i) == i:
                cnt = cnt + 1
            else:
                cnt = cnt + 2
    return cnt

d = dict()

a, b, c = map(int, input().split())
ans = 0
for i in range(1, a+1):
    for j in range(1, b+1):
        for k in range(1, c+1):
            if i * j * k not in d:
                d[i*j*k] = countDivisors(i*j*k)
                ans += d[i*j*k]
            else:
                ans += d[i*j*k]
print(ans)

a,b,c= [int(x) for x in input().split(' ')]

mod=1073741824

divisors=[1]*1000001

for i in range(2 , 1000001):
    for j in range(i , 1000001 , i ):
        divisors[j] +=1

ans = 0
#print(divisors[1])

for i in range(1 , a+1):
    for j in range(1 , b+1):
        for k in range(1 , c+1):
            ans += (divisors[i * j * k]) % mod

print(ans % mod)

line = raw_input()

tokens = line.split(' ')

a,b,c = int(tokens[0]), int(tokens[1]), int(tokens[2])

primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]

cache = (a * b * c + 1)* [0]

div_sum = 0

def compute_div_count(num):
    ans = 1
    for prime in primes:
        count = 1
        while num % prime == 0:
            count += 1
            num /= prime
        ans *= count
    return ans

for i in xrange(1, a + 1):
    for j in xrange(1, b + 1):
        for k in xrange(1, c + 1):
            num = i * j * k
            if cache[num] == 0:
                cache[num] = compute_div_count(num)
            div_sum = (div_sum + cache[num]) % 1073741824
print div_sum

a,b,c=[int(x) for x in input().split(' ')]
mod=1073741824

def divisors(x):
	powers={}
	i=2
	while(x!=1):
		if x%i==0:
			if i in powers:
				powers[i]+=1
			else:
				powers[i]=1
			x//=i
		else:
			i+=1
	return powers

primeFactors={}

for x in range(1,101):
	primeFactors[x]=divisors(x)

def finalMapPrepare(finalMap,x):
	for k in primeFactors[x]:
		if k in finalMap:
			finalMap[k]+=primeFactors[x][k]
		else:
			finalMap[k]=primeFactors[x][k]

total=0
for i in range(1,a+1):
	for j in range(1,b+1):
		for k in range(1,c+1):
			finalMap={}
			finalMapPrepare(finalMap,i)
			finalMapPrepare(finalMap,j)
			finalMapPrepare(finalMap,k)
			ans=1
			for v in finalMap.values():
				ans*=(v+1)
			total+=(ans)%mod
print(total%mod)

def easyNumbers():
    a,b,c=map(int,input().split())
    divisors=[1]*1000001
    n=a*b*c
    sum=0
    modulo=1073741824
    for i in range(2,n+1):
        for j in range(i,n+1,i):
            divisors[j] += 1
    for i in range(1,a+1):
        for j in range(1,b+1):
            for k in range(1,c+1):
                sum=sum+divisors[i*j*k]
    print(sum%modulo)

easyNumbers()

def dic(n):
    i=2
    f=1
    t=0
    while i*i<=n:

        while n%i==0:
            t+=1
            n//=i

        f=f*(t+1)
        t=0
        if i==2:
            i=3
        else:
            i+=2
    if n>1:
        f*=2

    return f

a,b,c=map(int,input().split())
d=dict()
a+=1
b+=1
c+=1
g=0
for i in range(1,a):
    for j in range(1,b):
        for z in range(1,c):
            ans=dic(i*j*z)

            g+=ans

print(g)

import sys
import time
import math
from functools import lru_cache

INF = 10 ** 18 + 3
EPS = 1e-10
MAX_CACHE = 10 ** 9

MOD = 1 << 30

# Decorators
def time_it(function, output=sys.stderr):
    def wrapped(*args, **kwargs):
        start = time.time()
        res = function(*args, **kwargs)
        elapsed_time = time.time() - start
        print('"%s" took %f ms' % (function.__name__, elapsed_time * 1000),
              file=output)
        return res

    return wrapped

@lru_cache(MAX_CACHE)
def calc_prime_divs(n):
    if n == 1:
        return ()
    sieve = [True] * (n // 2)
    for i in range(3, int(n ** 0.5) + 1, 2):
        if sieve[i // 2]:
            sieve[i * i // 2::i] = [False] * ((n - i * i - 1) // (2 * i) + 1)
    return (2,) + tuple(2 * i + 1 for i in range(1, n // 2) if sieve[i])

divisors = ()

@lru_cache(MAX_CACHE)
def calc_num_of_divs(n):
    # if n % 8 == 4 and n > 4:
    #     return calc_num_of_divs(4) * calc_num_of_divs(n // 4)
    # if n % 16 == 8:
    #     return (calc_num_of_divs(16) - 1) * calc_num_of_divs(n // 8)
    # if n % 27 == 9:
    #     return (calc_num_of_divs(27) - 1) * calc_num_of_divs(n // 9)
    res = 1
    for div in divisors:
        if n < div:
            break
        k = 1
        while n % div == 0:
            k += 1
            n //= div
        res *= k

    return res

@time_it
def main():
    a, b, c = map(int, input().split())
    global divisors
    divisors = calc_prime_divs(a * b * c + 1)
    print(sum(calc_num_of_divs(i * j * k) % MOD
              for i in range(a, 0, -1)
              for j in range(b, 0, -1)
              for k in range(c, 0, -1)))

def set_input(file):
    global input
    input = lambda: file.readline().strip()

def set_output(file):
    global print
    local_print = print

    def print(*args, **kwargs):
        kwargs["file"] = kwargs.get("file", file)
        return local_print(*args, **kwargs)

if __name__ == '__main__':
    set_input(open("input.txt", "r") if "MINE" in sys.argv else sys.stdin)
    set_output(sys.stdout)
    main()

a , b , c = map(int,input().split())

divs = [1] * 1000001
mod=1073741824

for i in range(2 , 1000001):
    for j in range(i , 1000001 , i ):
        divs[j] +=1

ans = 0
for i in range(1 , a + 1 ):
    for j in range(1 , b + 1):
        for k in range(1 , c + 1):
            ans += (divs[i*j*k]) % mod

print(ans % (mod*2**30))

a, b, c = map(int, input().split())
mod = 1073741824
n = a*b*c
div = [1]*(n+1)
for i in range(2, n+1):
    for j in range(i, n+1, i):
        div[j]+=1
ans = 0
for i in range(1,a+1):
    for j in range(1,b+1):
        for k in range(1,c+1):
            ans=(ans+div[i*j*k])%mod
print(ans)

a,b,c=map(int,input().split())
M=1073741824
n=a*b*c
d=[1]*(n+1)
for i in range(2,n+1):
    for j in range(i,n+1,i):
        d[j]+=1
r=0
for i in range(1,a+1):
    for j in range(1,b+1):
        for k in range(1,c+1):
            r+=(d[i*j*k])%M
print(r%M)

primes = []
d = {}
for i in range(2, 100):
    if i not in d:
        primes.append(i)
        j = 2
        while i * j < 100:
            d[i*j] = 1
            j += 1

def solve(x,y,z):
    d = {}
    for p in primes:
        d[p] = 0

    for p in primes:
        if p > x and p > y and p > z:
            break
        while x%p == 0:
            x /= p
            d[p] += 1
        while y%p == 0:
            y /= p
            d[p] += 1
        while z%p == 0:
            z /= p
            d[p] += 1
    ans = 1
    for p in primes:
        ans *= d[p] + 1
    return ans

a,b,c = map(int,input().split(' '))
ans = 0
seen = {}

for i in range(1, a+1):
    for j in range(1, b+1):
        for k in range(1, c+1):
            p = i*j*k
            if p in seen:
                ans = (ans + seen[p]) % 1073741824
            else:
                temp = solve(i,j,k)
                ans = (ans + temp) % 1073741824
                seen[p] = temp

print(ans)

def mergeDict(a, b, c):
    ret = a.copy()
    for key, value in b.items():
        if ret.has_key(key):
            ret[key] += value
        else:
            ret[key] = value

    for key, value in c.items():
        if ret.has_key(key):
            ret[key] += value
        else:
            ret[key] = value
    return ret

isPrime = [True] * 101
primeList = []
for i in xrange(2, 101):
    if isPrime[i] is True:
        primeList.append(i)
        for j in xrange(i + i, 101, i):
            isPrime[j] = False

decomposition = [None] * 101
decomposition[1] = {2:0} # special workaround
for prime in primeList:
    decomposition[prime] = {prime : 1}
    for i in xrange(2, 101):
        if decomposition[i] is not None and i * prime < 101:
            decomposition[i * prime] = decomposition[i].copy()
            if prime not in decomposition[i * prime].keys():
                decomposition[i * prime][prime] = 1
            else:
                decomposition[i * prime][prime] += 1

a, b, c = map(int, raw_input().split())
hashTable = {}
ans = 0
for ai in xrange(1, a+1):
    for bi in xrange(1, b+1):
        for ci in xrange(1, c+1):
            d = ai * bi * ci
            if hashTable.has_key(d):
                ans += hashTable[d]
            else:
                merge = mergeDict(decomposition[ai], decomposition[bi], decomposition[ci])
                num = reduce(lambda x, y: x*y, map(lambda x: x+1, merge.values()))
                ans += num
                hashTable[d] = num
            ans %= 1073741824

print ans

#236B

import math

arr = list(map(int, input().split(" ")))
a = arr[0]
b = arr[1]
c = arr[2]

d = dict()

def numdiv(n):
	if n in d:
		return d[n]
	else:
		count = 0
		for i in range(1, int(math.sqrt(n) + 1)):
			if n % i == 0:
				count += 2
		if int(math.sqrt(n)) * int(math.sqrt(n)) == n:
			count -= 1
		d[n] = count
		return count

answer = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			answer += numdiv(i * j * k)

print(answer)

a,b,c=[int(x) for x in input().split(' ')]
mod=1073741824
divisors=[1]*1000001
for x in range(2,1000001):
	for y in range(x,1000001,x):
		divisors[y]+=1
ans=0
for i in range(1,a+1):
	for j in range(1,b+1):
		for k in range(1,c+1):
			ans+=(divisors[i*j*k])%mod
print(ans%mod)

def mergeDict(a, b, c):
    ret = a.copy()
    for key, value in b.items():
        if ret.has_key(key):
            ret[key] += value
        else:
            ret[key] = value

    for key, value in c.items():
        if ret.has_key(key):
            ret[key] += value
        else:
            ret[key] = value
    return ret

def main():
    isPrime = [True] * 101
    primeList = []
    for i in xrange(2, 101):
        if isPrime[i] is True:
            primeList.append(i)
            for j in xrange(i + i, 101, i):
                isPrime[j] = False

    decomposition = [None] * 101
    decomposition[1] = {2:0} # special workaround
    for prime in primeList:
        decomposition[prime] = {prime : 1}
        for i in xrange(2, 101):
            if decomposition[i] is not None and i * prime < 101:
                decomposition[i * prime] = decomposition[i].copy()
                if prime not in decomposition[i * prime].keys():
                    decomposition[i * prime][prime] = 1
                else:
                    decomposition[i * prime][prime] += 1

    a, b, c = map(int, raw_input().split())
#a, b, c = 78, 90, 100
    hashTable = [0] * (a * b * c + 1)
    ans = 0
    for ai in xrange(1, a+1):
        for bi in xrange(1, b+1):
            for ci in xrange(1, c+1):
                d = ai * bi * ci
                if hashTable[d] is not 0:
                    ans += hashTable[d]
                else:
                    merge = mergeDict(decomposition[ai], decomposition[bi], decomposition[ci])
                    num = reduce(lambda x, y: x*y, map(lambda x: x+1, merge.values()))
                    ans += num
                    hashTable[d] = num

    print ans % 1073741824

if __name__ == "__main__":
    main()

from operator import mul
from functools import reduce
from collections import Counter

a, b, c = map(int, input().split())
mod = 2 ** 30

prime = [None] * 100

for i in range(2, 100):
    if prime[i - 1] is None:
        for j in range(i, 100, i):
            prime[j - 1] = i

d = {}
result = 0
for ai in range(1, a + 1):
    for bi in range(1, b + 1):
        for ci in range(1, c + 1):
            n = ai * bi * ci
            res = d.get(n)

            if res is None:
                cd = Counter()

                n_ai = ai
                while prime[n_ai - 1] is not None:
                    cd[prime[n_ai - 1]] += 1
                    n_ai //= prime[n_ai - 1]

                n_bi = bi
                while prime[n_bi - 1] is not None:
                    cd[prime[n_bi - 1]] += 1
                    n_bi //= prime[n_bi - 1]

                n_ci = ci
                while prime[n_ci - 1] is not None:
                    cd[prime[n_ci - 1]] += 1
                    n_ci //= prime[n_ci - 1]

                res = reduce(mul, map(lambda x: x + 1, cd.values()), 1)
                d[n] = res

            result += res

print(result % mod)

a,b,c=[int(x) for x in input().split(' ')]
mod=1073741824
divisors=[1]*1000001
for x in range(2,1001):
	for y in range(x,100001,x):
		divisors[y]+=1
ans=0
for i in range(1,a+1):
	for j in range(1,b+1):
		for k in range(1,c+1):
			ans+=(divisors[i*j*k])%mod
print(ans%mod)

a,b,c=[int(x) for x in input().split(' ')]
divisors=[1]*1000001
for x in range(2,1001):
	for y in range(x,100001,x):
		divisors[y]+=1
ans=0
for i in range(1,a+1):
	for j in range(1,b+1):
		for k in range(1,c+1):
			ans+=divisors[i*j*k]
print(ans)

a,b,c = map(int,input().split())
li = a*b*c +1
d = [1]*li
for i in range(2,li):
    for j in range(i,li,i):
        d[j]+=1

ans = 0
for i in range(1,a+1):
    for j in range(1,b+1):
        for z in range(1,c+1):
            ans += d[a*b*c]

print(ans)

from functools import reduce
from collections import Counter
import time
import datetime
from math import sqrt,gcd

def time_t():
    print("Current date and time: " , datetime.datetime.now())
    print("Current year: ", datetime.date.today().strftime("%Y"))
    print("Month of year: ", datetime.date.today().strftime("%B"))
    print("Week number of the year: ", datetime.date.today().strftime("%W"))
    print("Weekday of the week: ", datetime.date.today().strftime("%w"))
    print("Day of year: ", datetime.date.today().strftime("%j"))
    print("Day of the month : ", datetime.date.today().strftime("%d"))
    print("Day of week: ", datetime.date.today().strftime("%A"))

def ip():
    return int(input())

def sip():
    return input()

def mip():
    return map(int,input().split())

def mips():
    return map(str,input().split())

def lip():
    return list(map(int,input().split()))

def matip(n,m):
    lst=[]
    for i in range(n):
        arr = lip()
        lst.append(arr)
    return lst

def factors(n): # find the factors of a number
    return list(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))

def minJumps(arr, n): #to reach from 0 to n-1 in the array in minimum steps
    jumps = [0 for i in range(n)]
    if (n == 0) or (arr[0] == 0):
        return float('inf')
    jumps[0] = 0
    for i in range(1, n):
        jumps[i] = float('inf')
        for j in range(i):
            if (i <= j + arr[j]) and (jumps[j] != float('inf')):
                jumps[i] = min(jumps[i], jumps[j] + 1)
                break
    return jumps[n-1]

def dic(arr): # converting list into dict of count
    return Counter(arr)

def prime(n):
    for i in range(3,int(n**(0.5))+1,2):
        if n%i==0:
            return False
    return True

# --------------------------------------------------------- #
import sys
# sys.stdin = open('input.txt','r')
# sys.stdout = open('output.txt','w')
# --------------------------------------------------------- #
# n = sys.stdin.readline()
# arr = list(map(int, sys.stdin.readline().strip().split()))

a, b, c = mip()
ans = 0
for i in range(1, a+1):
    for j in range(1, b+1):
        for k in range(1, c+1):
            n = i*j*k
            fact = {}
            count = 0
            while(n%2 == 0):
                count += 1
                n //= 2
            if count:
                fact[2] = count
            for i in range(3, int(n**0.5)+1, 2):
                count = 0
                while n%i ==0:
                    count += 1
                    n //= i
                if count:
                    fact[i] = count
            if n>2:
                fact[n] = 1
            temp = 1
            for l in fact:
                temp *= (fact[l]+1)
                temp %= 1073741824
            ans += temp
            ans %= 1073741824
print(ans%1073741824)

from functools import reduce
from collections import Counter
import time
import datetime
from math import sqrt,gcd

def time_t():
    print("Current date and time: " , datetime.datetime.now())
    print("Current year: ", datetime.date.today().strftime("%Y"))
    print("Month of year: ", datetime.date.today().strftime("%B"))
    print("Week number of the year: ", datetime.date.today().strftime("%W"))
    print("Weekday of the week: ", datetime.date.today().strftime("%w"))
    print("Day of year: ", datetime.date.today().strftime("%j"))
    print("Day of the month : ", datetime.date.today().strftime("%d"))
    print("Day of week: ", datetime.date.today().strftime("%A"))

def ip():
    return int(input())

def sip():
    return input()

def mip():
    return map(int,input().split())

def mips():
    return map(str,input().split())

def lip():
    return list(map(int,input().split()))

def matip(n,m):
    lst=[]
    for i in range(n):
        arr = lip()
        lst.append(arr)
    return lst

def factors(n): # find the factors of a number
    return list(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))

def minJumps(arr, n): #to reach from 0 to n-1 in the array in minimum steps
    jumps = [0 for i in range(n)]
    if (n == 0) or (arr[0] == 0):
        return float('inf')
    jumps[0] = 0
    for i in range(1, n):
        jumps[i] = float('inf')
        for j in range(i):
            if (i <= j + arr[j]) and (jumps[j] != float('inf')):
                jumps[i] = min(jumps[i], jumps[j] + 1)
                break
    return jumps[n-1]

def dic(arr): # converting list into dict of count
    return Counter(arr)

def prime(n):
    for i in range(3,int(n**(0.5))+1,2):
        if n%i==0:
            return False
    return True

# --------------------------------------------------------- #
import sys
# sys.stdin = open('input.txt','r')
# sys.stdout = open('output.txt','w')
# --------------------------------------------------------- #
# n = sys.stdin.readline()
# arr = list(map(int, sys.stdin.readline().strip().split()))

a, b, c = mip()
ans = 0
for i in range(1, a+1):
    for j in range(1, b+1):
        for k in range(1, c+1):
            n = i*j*k
            fact = {}
            count = 0
            while(n%2 == 0):
                count += 1
                n //= 2
            if count:
                fact[2] = count
            for i in range(3, int(n**0.5)+1, 2):
                count = 0
                while n%i ==0:
                    count += 1
                    n //= i
                if count:
                    fact[i] = count
            if n>2:
                fact[n] = 1
            temp = 1
            for l in fact:
                temp *= fact[l]
                temp %= 1073741824
            ans += temp
            ans %= 1073741824
print(ans%1073741824)

d={}
for i in range(1,1000001):d[i]=set()
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            d[i*j*k]|={1,i,j,k,i*j,j*k,k*i,i*j*k}
a,b,c=map(int,input().split());ans=0
for i in range(1,a+1):
    for j in range(1,b+1):
        for k in range(1,c+1):ans=(ans+len(d[i*j*k]))#%1073741824
print(ans)

from math import *
def div(x):
    s=0
    for i in range(1,ceil(sqrt(x))):
        if x%i==0:s+=1
        if x%(x//i)==0:s+=1
    return s
d=[0]*(1000001)
a,b,c=map(int,input().split());ans=0
for i in range(1,a+1):
    for j in range(1,b+1):
        for k in range(1,c+1):
            if d[i*j*k]==0:d[i*j*k]=div(i*j*k)
            ans=(ans+d[i*j*k])%1073741824
print(ans)

import operator as op
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from functools import reduce
from itertools import (
    accumulate, combinations, combinations_with_replacement, groupby,
    permutations, product)
from math import (acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot,
                  log2, pi, radians, sin, sqrt, tan)
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
    return(int(input()))

def inlist():
    return(list(map(int, input().split())))

def instr():
    s = input()
    return(list(s[:len(s)]))

def invr():
    return(map(int, input().split()))

def def_value():
    return 0

def nod(n):
    if dp[n] > 0:
        return dp[n]
    limit = int(sqrt(n)) + 1
    res = 1
    for i in range(2, limit+1):
        a = 0
        while n % i == 0:
            n //= i
            a += 1
        res *= (a + 1)
    if n > 1:
        res *= 2
    dp[n] = res
    return dp[n]

a, b, c = invr()
mod = 1073741824
dp = [0] * ((a*b*c)+1)

tot = 0

for i in range(1, a+1):
    for j in range(1, b+1):
        for k in range(1, c+1):
            tot += nod(i*j*k) % mod
print(tot)

l = [1]*1000001

for i in range(2,1000001):
    for j in range(i, 1000000, i):
        l[j] += 1
        j += i

a, b, c = map(int, input().split())

d = 0
MOD = 1073741824

for i in range(1, a+1):
    for j in range(1, b+1):
        for k in range(1, c+1):
            d = (d+l[i*j*k])%MOD

print(d)