Let's denote *d*(*n*) as the number of divisors of a positive integer *n*. You are given three integers *a*, *b* and *c*. Your task is to calculate the following sum:

Find the sum modulo 1073741824 (2<sup class="upper-index">30</sup>).
The first line contains three space-separated integers *a*, *b* and *c* (1 ≤ *a*, *b*, *c* ≤ 2000).
maxn = 2001;
mod = 2**30 #1073741824
#z = (maxn, maxn)
gcd = [[0 for i  in range(maxn)] for j in range(maxn) ]
mu = [0 for i  in range(maxn)]
p = []
vis =[0 for i  in range(maxn)]	


def init():
	res = 0 
	mu[1] = 1 
	for i  in range(2, maxn):
		if (vis[i] == 0):
			p.append(i) 
			res+=1
			mu[i] = -1
		j=0
		while j<res and  i * p[j] < maxn:
			vis[i * p[j]] = 1 
			if i % p[j] == 0:
				mu[i * p[j]] = 0 			
				break                                      
			else:
				mu[i * p[j]] = -mu[i]
			j+=1
	for i in range(0,maxn):
		gcd[i][0] = gcd[0][i] = i 
	for i in range(1,maxn):
		for j in range(1,i+1):
			gcd[j][i] = gcd[i][j] = gcd[j][i % j] 
	h=1 


def deal(n, d, i):
	ans = 0 
	for j in range(1,int(n)+1):
		if (gcd[i][j * d] == 1):
			ans += (int)(n / j) 
	return ans


init()
print("termine el init, empiezo el while")
while (True):
	print("Teclee los 3 numero dando enter en cada uno")    #entrada = (Console.ReadLine()).Split(' ');
	a, b, c = input().split(' ')
	a = int(a)
	b = int(b)
	c = int(c)

	ans = 0;
	min = b
	if 	c<b:
		min = c
	for i in range(1,a+1):
		res = 0
		for d in range(1, min+1 ):  #np.min(b, c)
			res += (mu[d] * deal(b / d, d, i) * deal(c / d, d, i)) 
		ans +=  int(a / i) * res  ;
	ans &= (mod-1);
	print(ans)