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:

$\sum_{i = 1}^{a} \sum_{j = 1}^{b} \sum_{k = 1}^{c} d(i \cdot j \cdot k)$

Find the sum modulo 1073741824 (2^30).


-----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 (2^30).


-----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.

Source: codeforces | Difficulty: EASY
Tags: Number theory

Implementation


Solutions:
(a, b, c) = map(int, input().split())
uniquenums = {}
ret = 0

def dfunc(n):
	score = 0
	for i in range(1, int(n ** (1 / 2)) + 1):
		if n % i == 0:
			score += 1
	score *= 2
	if n ** (1 / 2) == int(n ** (1 / 2)):
		score -= 1
	return score
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			mult = i * j * k
			if mult not in uniquenums:
				uniquenums[mult] = dfunc(mult)
			ret += uniquenums[mult]
print(ret % 1073741824)


from math import sqrt, floor
(a, b, c) = map(int, input().split())
product = a * b * c
ds = [0] * (product + 1)
for i in range(1, product + 1):
	j = 1
	while j * i <= product:
		ds[i * j] += 1
		j += 1
out = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			out += ds[i * j * k]
			out %= 1073741824
print(out)


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


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())
d = 1073741824
p = [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]
t = [{} for i in range(101)]
ans = {}
for i in p:
	j = i
	m = 1
	while j < 101:
		for k in range(j, 101, j):
			t[k][i] = m
		j = j * i
		m += 1
s = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		q = {}
		for x in t[i].keys() | t[j].keys():
			q[x] = t[i].get(x, 0) + t[j].get(x, 0)
		ij = i * j
		for k in range(1, c + 1):
			ijk = ij * k
			if ijk in ans:
				s += ans[ijk]
			else:
				y = 1
				for x in q.keys() | t[k].keys():
					y = y * (q.get(x, 0) + t[k].get(x, 0) + 1)
				ans[ijk] = y
				s += y
print(s)


def divi(a):
	c = 0
	x = int(a ** 0.5)
	for i in range(1, x + 1):
		if a % i == 0 and a / i == i:
			c += 1
		elif a % i == 0 and a / i != i:
			c += 2
	return c
s = 0
d = {}
(a, b, c) = map(int, input().split())
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			t = i * j * k
			if t not in d:
				d[t] = divi(t)
			s += d[t]
print(s % 2 ** 30)


s = 0
(a, b, c) = map(int, input().split())
l = [0] * (a * b * c + 1)
for i in range(1, a * b * c + 1):
	for j in range(i, a * b * c + 1, i):
		l[j] += 1
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			s += l[i * j * k]
print(s % 2 ** 30)


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


p = [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, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997]

def divs(n):
	res = 1
	pos = 0
	while n > 1:
		while pos < len(p) and n % p[pos] != 0:
			pos += 1
		if n > 1 and pos >= len(p):
			res *= 2
			break
		cnt = 0
		while n % p[pos] == 0:
			cnt += 1
			n //= p[pos]
		res *= cnt + 1
		pos += 1
	return res
d = {}
(a, b, c) = 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):
			val = i * j * k
			if val not in d:
				d[val] = divs(val)
			res = (res + d[val]) % 1073741824
print(res)


from math import sqrt, ceil
(a, b, c) = map(int, input().split())
cache = {}

def s(n):
	if n in cache:
		return cache[n]
	if n == 1:
		return 1
	sn = sqrt(n)
	r = 0
	for i in range(1, int(sn) + 1):
		if n % i == 0:
			r += 1
			if i * i < n:
				r += 1
	cache[n] = r
	return r
su = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			rr = s(i * j * k)
			su += rr
			su %= 1073741824
print(su)


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
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 & 1073741823)


(a, b, c) = map(int, input().split())
primes = []
for i in range(2, 101):
	for j in range(2, i):
		if i % j == 0:
			break
	else:
		primes.append(i)
divisors = []
for i in range(1, 101):
	divisors.append([0] * len(primes))
	n = i
	for j in range(len(primes)):
		while n > 0 and n % primes[j] == 0:
			n = n // primes[j]
			divisors[i - 1][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):
			d = 1
			ijk_divs = [0] * len(primes)
			for zzz in range(len(primes)):
				d *= divisors[i - 1][zzz] + divisors[j - 1][zzz] + divisors[k - 1][zzz] + 1
			r += d % 1073741824
print(r)


p = [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 dp(n):
	ans = 1
	y = 0
	for i in p:
		if n < i:
			break
		y = 1
		while n % i == 0 and n >= i:
			n /= i
			y += 1
		ans *= y
	return ans
(a, b, c) = list(map(int, input().split()))
x = dict()
total = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			e = i * j * k
			if e not in x:
				x[e] = dp(e)
			total += x[e]
print(total)


import sys
import math
import itertools
import collections

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 cdiv(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 wr(arr):
	return ' '.join(map(str, arr))

def revn(n):
	return str(n)[::-1]

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=3):
	newnumber = ''
	while number > 0:
		newnumber = str(number % base) + newnumber
		number //= base
	return newnumber
(a, b, c) = mi()
ans = 0
d = {}
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			item = i * j * k
			if item not in d:
				d[item] = len(divs(i * j * k))
				ans += d[item]
			else:
				ans += d[item]
print(ans)


from fractions import gcd
(a, b, c) = list(map(int, input().split()))
ans = 0
mod = 1073741824
div = [0] * 1000001
for i in range(1, 1000001):
	j = i
	while j <= 1000000:
		div[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):
			ans += div[i * j * k]
print(ans % mod)


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


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


mod = 1 << 30
d = {}

def div(x):
	if x in d:
		return d[x]
	(res, p, q) = (1, 2, x)
	while p * p <= x:
		r = 1
		while x % p == 0:
			x /= p
			r += 1
		res = res * r % mod
		p += 1
	if x > 1:
		res = res * 2 % mod
	d[q] = res
	return res
(a, b, c) = sorted(map(int, input().split()))
s = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			s += div(i * j * k)
print(s)


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)


import math as mt
import sys, string, bisect
input = sys.stdin.readline
from collections import deque
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : list(map(int, input().split()))
I = lambda : int(input())
(a, b, c) = M()
MAX = a * b * c + 1
factor = [0] * (MAX + 1)

def generatePrimeFactors():
	factor[1] = 1
	for i in range(2, MAX):
		factor[i] = i
	for i in range(4, MAX, 2):
		factor[i] = 2
	i = 3
	while i * i < MAX:
		if factor[i] == i:
			j = i * i
			while j < MAX:
				if factor[j] == j:
					factor[j] = i
				j += i
		i += 1

def calculateNoOFactors(n):
	if n == 1:
		return 1
	ans = 1
	dup = factor[n]
	c = 1
	j = int(n / factor[n])
	while j > 1:
		if factor[j] == dup:
			c += 1
		else:
			dup = factor[j]
			ans = ans * (c + 1)
			c = 1
		j = int(j / factor[j])
	ans = ans * (c + 1)
	return ans
d = [0] * (a * b * c + 1)
generatePrimeFactors()
x = 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] = calculateNoOFactors(i * j * k)
			x += d[i * j * k] % 1073741824
print(x % 1073741824)


(a, b, c) = map(int, input().split())
p = [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]
mod = 1073741824

def divisor(x):
	y = 0
	ans = 1
	for i in p:
		if x < i:
			break
		y = 1
		while x % i == 0 and x >= i:
			x /= i
			y += 1
		ans *= y
	return ans
sm = 0
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 dict.keys():
				dict[i * j * k] = divisor(i * j * k)
			sm = sm + dict[i * j * k]
print(sm % mod)


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, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151]
mmm = 1073741824
import math
(a, b, c) = list(map(int, input().split()))
arr = []
count = 0

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
for smh1 in range(1, a + 1):
	for smh2 in range(1, b + 1):
		for smh3 in range(1, c + 1):
			xxx = d(smh1 * smh2 * smh3)
			count += xxx
print(count % mmm % mmm)


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)


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):
	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):
	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):
	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)


from collections import defaultdict
mod = 1073741824
(a, b, c) = map(int, input().split())

def primeFactors(n):
	dic = defaultdict(int)
	factors = []
	while n % 2 == 0:
		dic[2] += 1
		n = n // 2
	i = 3
	while i * i <= n:
		while n % i == 0:
			dic[i] += 1
			n = n // i
		i += 2
	if n > 2:
		dic[n] += 1
	return dic

def calc(n):
	res = 1
	dic = primeFactors(n)
	for val in dic.values():
		res = res * (val + 1) % mod
	return res
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 + calc(i * j * k)) % mod
print(ans)


import sys, math, itertools, random, bisect
from collections import defaultdict
INF = sys.maxsize

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def input():
	return sys.stdin.readline().strip()
mod = 10 ** 9 + 7
mp = {}

def d(x):
	if x in mp:
		return mp[x]
	ans = 0
	r = 1
	while r * r <= x:
		if x % r == 0:
			if x == r * r:
				ans += 1
			else:
				ans += 2
		r += 1
	mp[x] = ans
	return ans
for _ in range(1):
	(a, b, c) = get_ints()
	ans = 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
				ans += d(x)
	print(ans)


import math
from functools import reduce

def get_factors_count(nb: int) -> int:
	counts = {2: 0}
	while nb % 2 == 0:
		counts[2] += 1
		nb //= 2
	iter_range = range(3, int(math.sqrt(nb)) + 1, 2)
	counts = {**counts, **dict.fromkeys(iter_range, 0)}
	for i in iter_range:
		while nb % i == 0:
			counts[i] += 1
			nb //= i
	if nb > 2:
		counts[nb] = 1
	return reduce(lambda a, b: a * (b + 1), counts.values(), 1)
result = 0
calculated = dict()
(a, b, c) = map(int, input().split())
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			product = i * j * k
			if product not in calculated.keys():
				calculated[product] = get_factors_count(i * j * k)
			result += calculated[product]
print(result % 2 ** 30)


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


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


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)


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


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 list(f.items()):
						res *= v + 1
					cache[p] = res // 2
				ans += cache[p]
	return ans % 1073741824

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

def __starting_point():
	main()
__starting_point()


import sys
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]
dp = {}
for i in range(len(primes)):
	dp[primes[i]] = 2

def factors(n):
	if n in dp:
		return dp[n]
	k = n
	s = 1
	for i in range(len(primes)):
		if n % primes[i] == 0:
			c = 0
			while n % primes[i] == 0 and n >= primes[i]:
				c += 1
				n = n // primes[i]
			s *= c + 1
	dp[k] = s
	return s
(a, b, c) = map(int, sys.stdin.readline().split())
s = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			s += factors(i * j * k)
print(s % 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]
l = []
l.append(primes)
for i in range(100):
	ii = i + 1
	a = [0] * 25
	for j in range(25):
		if ii == 1:
			break
		while ii % primes[j] == 0:
			a[j] += 1
			ii = ii / primes[j]
	l.append(a)
(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):
			div = 1
			for d in range(25):
				div *= 1 + l[i][d] + l[j][d] + l[k][d]
			ans += div
ans %= 1073741824
print(ans)


(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 primes1(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)


def sol(x):
	if d[x] != 0:
		return d[x]
	z = 1
	(res, p, q) = (0, 1, x)
	while p * p <= x:
		if x % z == 0:
			res += 1
			if z * z != x:
				res += 1
		p += 1
		z += 1
	d[x] = res
	return res
(a, b, c) = map(int, input().split())
d = [0] * 10000001
ans = 0
MOD = 1073741824
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			ans += sol(i * j * k)
print(ans % MOD)


lis = list(map(int, input().split()))
sumall = 0
dic = {}
modulo = 1073741824

def number_of_divisors(a):
	if a in dic:
		return dic[a]
	(res, i, t) = (1, 2, a)
	while i * i <= a:
		r = 1
		while a % i == 0:
			a /= i
			r += 1
		res = res * r % modulo
		i += 1
	if a > 1:
		res = res * 2 % modulo
	dic[t] = res
	return res
for i in range(1, lis[0] + 1):
	for j in range(1, lis[1] + 1):
		for k in range(1, lis[2] + 1):
			s = (i, j, k)
			sumall += number_of_divisors(i * j * k)
print(sumall % modulo)


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


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)


from functools import reduce

def main():
	from itertools import product
	from functools import reduce
	from operator import mul
	(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(list(range(1, a + 1)), list(range(1, b + 1)), list(range(1, c + 1))):
		xyz = x * y * z
		if xyz in cache:
			res += cache[xyz]
		else:
			cache[xyz] = u = reduce(mul, list(map(sum, list(zip(l[x], l[y], l[z], (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1))))), 1) & 1073741823
			res += u
	print(res & 1073741823)

def __starting_point():
	main()
__starting_point()


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 math
(a, b, c) = map(int, input().split())
mod = 1073741824
n = a * b * c
divs = [1] * (n + 1)
for i in range(2, n + 1):
	for j in range(i, n + 1, i):
		divs[j] += 1
count = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			count += divs[i * j * k] % mod
print(count % mod)


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)


from functools import lru_cache
from math import sqrt, ceil

@lru_cache(None)
def countDevisor(n):
	count = 0
	for i in range(int(sqrt(n))):
		if n % (i + 1) == 0:
			if n / (i + 1) == i + 1:
				count += 1
			else:
				count += 2
	return count
(a, b, c) = list(map(int, input().split()))
modulo = 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):
			ans += countDevisor(i * j * k)
print(ans % modulo)


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

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)
set_input(open('input.txt', 'r') if 'MINE' in sys.argv else sys.stdin)
set_output(sys.stdout)
main()


from __future__ import division, print_function
import math
import os
import sys
from fractions import *
from sys import *
from decimal import *
from io import BytesIO, IOBase
from itertools import *
from collections import *
M = 10 ** 9 + 7
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

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 fsep():
	return map(float, inp().split())

def inpu():
	return int(inp())

def regularbracket(t):
	p = 0
	for i in t:
		if i == '(':
			p += 1
		else:
			p -= 1
		if p < 0:
			return False
	else:
		if p > 0:
			return False
		else:
			return True

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] <= key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def reverse1(string):
	pp = ''
	for i in string[::-1]:
		pp += i
	if pp == string:
		return True
	return False

def reverse2(list1):
	l = []
	for i in list1[::-1]:
		l.append(i)
	if l == list1:
		return True
	return False

def mex(list1):
	p = max(list1) + 1
	for i in range(len(list1)):
		if list1[i] != i:
			p = i
			break
	return p

def sumofdigits(n):
	n = str(n)
	s1 = 0
	for i in n:
		s1 += int(i)
	return s1

def perfect_square(n):
	s = math.sqrt(n)
	if s == int(s):
		return True
	return False

def roman_number(x):
	if x > 15999:
		return
	value = [5000, 4000, 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]
	symbol = ['F', 'MF', 'M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I']
	roman = ''
	i = 0
	while x > 0:
		div = x // value[i]
		x = x % value[i]
		while div:
			roman += symbol[i]
			div -= 1
		i += 1
	return roman

def soretd(s):
	for i in range(1, len(s)):
		if s[i - 1] > s[i]:
			return False
	return True

def countRhombi(h, w):
	ct = 0
	for i in range(2, h + 1, 2):
		for j in range(2, w + 1, 2):
			ct += (h - i + 1) * (w - j + 1)
	return ct

def countrhombi2(h, w):
	return h * h // 4 * (w * w // 4)

def binpow(a, b):
	if b == 0:
		return 1
	else:
		res = binpow(a, b // 2)
	if b % 2 != 0:
		return res * res * a
	else:
		return res * res

def binpowmodulus(a, b, m):
	a %= m
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % m
		a = a * a % m
		b >>= 1
	return res

def coprime_to_n(n):
	result = n
	i = 2
	while i * i <= n:
		if n % i == 0:
			while n % i == 0:
				n //= i
			result -= result // i
		i += 1
	if n > 1:
		result -= result // n
	return result

def prime(x):
	if x == 1:
		return False
	else:
		for i in range(2, int(math.sqrt(x)) + 1):
			if x % i == 0:
				return False
		else:
			return True

def luckynumwithequalnumberoffourandseven(x, n, a):
	if x >= n and str(x).count('4') == str(x).count('7'):
		a.append(x)
	elif x < 1000000000000.0:
		luckynumwithequalnumberoffourandseven(x * 10 + 4, n, a)
		luckynumwithequalnumberoffourandseven(x * 10 + 7, n, a)
	return a

def luckynum(x, l, r, a):
	if x >= l and x <= r:
		a.append(x)
	if x > r:
		a.append(x)
		return a
	if x < 10000000000.0:
		luckynum(x * 10 + 4, l, r, a)
		luckynum(x * 10 + 7, l, r, a)
	return a

def luckynuber(x, n, a):
	p = set(str(x))
	if len(p) <= 2:
		a.append(x)
	if x < n:
		luckynuber(x + 1, n, a)
	return a

def interact(type, x):
	if type == 'r':
		inp = input()
		return inp.strip()
	else:
		print(x, flush=True)

def findTrailingZeros(n):
	count = 0
	while n >= 5:
		n //= 5
		count += n
	return count

def mergeSort(arr):
	if len(arr) > 1:
		mid = len(arr) // 2
		L = arr[:mid]
		R = arr[mid:]
		mergeSort(L)
		mergeSort(R)
		i = j = k = 0
		while i < len(L) and j < len(R):
			if L[i] < R[j]:
				arr[k] = L[i]
				i += 1
			else:
				arr[k] = R[j]
				j += 1
			k += 1
		while i < len(L):
			arr[k] = L[i]
			i += 1
			k += 1
		while j < len(R):
			arr[k] = R[j]
			j += 1
			k += 1
res = set()

def solven(p, l, a, b, n):
	if p > n or l > 10:
		return
	if p > 0:
		res.add(p)
	solven(p * 10 + a, l + 1, a, b, n)
	solven(p * 10 + b, l + 1, a, b, n)

def subsetsUtil(A, subset, index, d):
	print(*subset)
	s = sum(subset)
	d.append(s)
	for i in range(index, len(A)):
		subset.append(A[i])
		subsetsUtil(A, subset, i + 1, d)
		subset.pop(-1)
	return d

def subsetSums(arr, l, r, d, sum=0):
	if l > r:
		d.append(sum)
		return
	subsetSums(arr, l + 1, r, d, sum + arr[l])
	subsetSums(arr, l + 1, r, d, sum)
	return d

def print_factors(x):
	factors = []
	for i in range(1, x + 1):
		if x % i == 0:
			factors.append(i)
	return factors

def calc(X, d, ans, D):
	if len(X) == 0:
		return
	i = X.index(max(X))
	ans[D[max(X)]] = d
	Y = X[:i]
	Z = X[i + 1:]
	calc(Y, d + 1, ans, D)
	calc(Z, d + 1, ans, D)

def factorization(n, l):
	c = n
	if prime(n) == True:
		l.append(n)
		return l
	for i in range(2, c):
		if n == 1:
			break
		while n % i == 0:
			l.append(i)
			n = n // i
	return l

def good(b):
	l = []
	i = 0
	while len(b) != 0:
		if b[i] < b[len(b) - 1 - i]:
			l.append(b[i])
			b.remove(b[i])
		else:
			l.append(b[len(b) - 1 - i])
			b.remove(b[len(b) - 1 - i])
	if l == sorted(l):
		return True
	return False

def generate(st, s):
	if len(s) == 0:
		return
	if s not in st:
		st.add(s)
		for i in range(len(s)):
			t = list(s).copy()
			t.remove(s[i])
			t = ''.join(t)
			generate(st, t)
	return

def largestincreasingsubsequence(A):
	l = [1] * len(A)
	sub = []
	for i in range(1, len(l)):
		for k in range(i):
			if A[k] < A[i]:
				sub.append(l[k])
		l[i] = 1 + max(sub, default=0)
	return max(l, default=0)

def findOR(nums, N):
	prefix_sum = 0
	result = 0
	for i in range(N):
		result |= nums[i]
		prefix_sum += nums[i]
		result |= prefix_sum
	return result

def OR(a, n):
	ans = a[0]
	for i in range(1, n):
		ans |= a[i]
	return ans

def main():
	(a, b, c) = sep()
	n = a * b * c + 1
	d = [1] * n
	for i in range(2, n):
		for j in range(i, n, i):
			d[j] += 1
	cnt = 0
	for i in range(1, a + 1):
		for j in range(1, b + 1):
			for k in range(1, c + 1):
				cnt += d[i * j * k]
	print(cnt % 2 ** 30)
main()


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

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):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
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()


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


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)


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

def factorize(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)


import math
prime = [2, 3, 5, 7, 11]
d = {}

def GeneratePrimes():
	for i in range(12, 1010):
		for j in prime:
			if i % j == 0:
				break
			if j * j > i:
				prime.append(i)
				break
		else:
			prime.append(i)

def UpperBound(x):
	l = 0
	h = len(prime)
	while l <= h:
		m = (l + h) // 2
		if x > prime[m]:
			l = m + 1
		elif x < prime[m]:
			h = m - 1
		else:
			return m
	return l
GeneratePrimes()

def NumberOfDiv(x):
	count = 1
	for i in prime:
		if i * i > x:
			break
		if x % i == 0:
			b = 0
			while x % i == 0:
				b += 1
				x //= i
			count *= b + 1
	if x != 1:
		count *= 2
	return count
(a, b, c) = map(int, input().split())
res = 0
mod = 2 ** 30
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			res += NumberOfDiv(i * j * k)
		res = res % mod
print(res % mod)


import os
import sys
from io import BytesIO, IOBase
mod = 1073741824
from math import sqrt, ceil

def solve(n):
	ans = 0
	for i in range(1, int(sqrt(n)) + 1):
		if n % i == 0:
			if n / i == i:
				ans += 1
			else:
				ans += 2
	return ans

def main():
	(a, b, c) = map(int, input().split())
	ans = 0
	dp = [0] * (a * b * c + 1)
	for i in range(1, a + 1):
		for j in range(1, b + 1):
			for k in range(1, c + 1):
				temp = i * j * k
				if dp[temp] == 0:
					dp[temp] = solve(temp)
				ans = (ans + dp[temp]) % mod
	print(ans)

def nouse0():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')

def nouse1():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')

def nouse2():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def nouse3():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')

def nouse4():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')

def nouse5():
	a = 420
	b = 420
	print(f'i am nitish{(a + b) // 2}')
main()


from __future__ import division, print_function
from collections import defaultdict
mod = 1073741824
import os
import sys
from io import BytesIO, IOBase

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

	def primeFactors(n):
		dic = defaultdict(int)
		factors = []
		while n % 2 == 0:
			dic[2] += 1
			n = n // 2
		i = 3
		while i * i <= n:
			while n % i == 0:
				dic[i] += 1
				n = n // i
			i += 2
		if n > 2:
			dic[n] += 1
		return dic

	def calc(n):
		res = 1
		dic = primeFactors(n)
		for val in dic.values():
			res = res * (val + 1) % mod
		return res
	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 + calc(i * j * k)) % mod
	print(ans)
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


def gint():
	return int(input())

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

def gfloat():
	return float(input())

def gfloat_arr():
	return list(map(float, input().split()))

def pair_int():
	return map(int, input().split())
INF = 1 << 31
dx = [-1, 0, 1, 0]
dy = [0, 1, 0, -1]
(a, b, c) = gint_arr()
n = a * b * c + 1
factors = [1] * n
for i in range(2, n):
	for j in range(i, n, i):
		factors[j] += 1
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 + factors[i * j * k]) % 1073741824
print(res)


def main():
	MOD = 2 ** 30
	(a, b, c) = [int(i) for i in input().split()]
	n = a * b * c
	dp = [0 for i in range(n + 1)]
	for i in range(1, n + 1):
		for j in range(i, n + 1, i):
			dp[j] += 1
	sm = 0
	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
				sm = (sm % MOD + dp[num] % MOD) % MOD
	print(sm)
main()


def fastio():
	import sys
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()
p = [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):
	y = 0
	ans = 1
	for i in p:
		if x < i:
			break
		y = 1
		while x % i == 0 and x >= i:
			x /= i
			y += 1
		ans *= y
	return ans
(a, b, c) = map(int, input().split())
out = 0
q = {}
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			e = i * j * k
			if e not in q:
				q[e] = d(e)
			out += q[e]
print(out % 1073741824)


(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]
dict1 = {}
for prime in primes:
	dict1[prime] = 2

def countfact(num):
	if num in dict1:
		return dict1[num]
	xnum = num
	count = 1
	for prime in primes:
		if num % prime == 0:
			c = 0
			while num % prime == 0:
				c += 1
				num //= prime
			count *= c + 1
	dict1[xnum] = count
	return count
summ = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			summ += countfact(i * j * k)
print(summ % 1073741824)


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)


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


from math import sqrt, ceil
(a, b, c) = list(map(int, input().split()))
N = a * b * c + 1

def generate_prime(N, pp, prime):
	pp[1] = False
	for i in range(2, N):
		if pp[i]:
			prime.append(i)
			x = i ** 2
			while x < N:
				pp[x] = False
				x = x + i
prime = []
pp = [True] * N
generate_prime(N, pp, prime)

def divisor_count(num):
	ans = 1
	if num == 1:
		return 1
	for p in prime:
		factor = 0
		while num:
			if num % p == 0:
				factor += 1
				num = num // p
			else:
				ans = ans * (factor + 1)
				break
		if pp[num]:
			ans = ans * 2
			break
		if num == 1:
			break
	return ans
d = {}
res = 0
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for k in range(1, c + 1):
			t = i * j * k
			if t not in d:
				d[t] = divisor_count(t)
			res = res + d[t]
print(res)


(a, b, c) = map(int, input().strip().split())
dp = {}
ut = {}
res = 0

def findFactors(n):
	if n in ut:
		pass
	else:
		factors = {}
		curr = 2
		while n % 2 == 0:
			factors[2] = factors.get(2, 0) + 1
			n = n // 2
		i = 3
		while i < n:
			while n % i == 0:
				factors[i] = factors.get(i, 0) + 1
				n //= i
			i += 2
		if n > 1:
			factors[n] = 1
		ut[n] = 1
		for i in factors:
			ut[n] *= factors[i] + 1
	return ut[n]
for aa in range(1, a + 1):
	for bb in range(1, b + 1):
		for cc in range(1, c + 1):
			n = aa * bb * cc
			if n in dp:
				pass
			else:
				dp[n] = findFactors(n)
			res += dp[n]
print(res)


def fact(n):
	ans = []
	x = 2
	while x * x <= n:
		if n % x == 0:
			ans.append(x)
			n //= x
		else:
			x += 1
	if n > 1:
		ans.append(n)
	return ans
(a, b, c) = map(int, input().split())
facts = []
ans = []
all = 0
for i in range(1, 101):
	facts.append(fact(i))
for i in range(1, a + 1):
	for j in range(1, b + 1):
		for h in range(1, c + 1):
			ans = []
			for l in range(len(facts[i - 1])):
				ans.append(facts[i - 1][l])
			for l in range(len(facts[j - 1])):
				ans.append(facts[j - 1][l])
			for l in range(len(facts[h - 1])):
				ans.append(facts[h - 1][l])
			k = []
			for q in range(100):
				k.append(0)
			for q in range(len(ans)):
				k[ans[q] - 1] += 1
			anss = 1
			for q in k:
				anss *= q + 1
			all += anss
print(all)


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 n / i == i:
					cnt = cnt + 1
				else:
					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)


(n, m, l) = map(int, input().split())
k = n * m * l
arr = [0] * (k + 1)
arr[0] = 1
arr[1] = 1
for i in range(2, k + 1):
	for j in range(i + i, k + 1, i):
		arr[j] += 1
	arr[i] += 2
su = 0
for i in range(1, n + 1):
	for j in range(1, m + 1):
		for k in range(1, l + 1):
			xx = i * j * k
			su += arr[xx]
print(su)


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)


from sys import stdin, stdout

def insr():
	s = input()
	return list(s[:])

def inlt():
	return list(map(int, input().split()))
inp = inlt()
sol = [0] * 1000001

def count_divisors(a):
	if sol[a] != 0:
		return sol[a]
	(i, c) = (1, 0)
	while i * i <= a:
		if a % i == 0:
			if i * i != a:
				c += 1
			c += 1
		i += 1
	sol[a] = c
	return c
s = 0
for i in range(1, inp[0] + 1):
	for j in range(1, inp[1] + 1):
		for k in range(1, inp[2] + 1):
			s += count_divisors(i * j * k)
print(s % 1073741824)


import math
(a, b, c) = map(int, input().split())
n = a * b * c
d = [1] * (n + 1)
d[0] = 0
for i in range(2, n + 1):
	for j in range(i, n + 1, i):
		d[j] += 1
print(sum((d[i * j * k] for i in range(1, a + 1) for j in range(1, b + 1) for k in range(1, c + 1))) % (1 << 30))


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


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)