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* ≤ 100).
from math import sqrt
a, b, c = map(int, input().split(' '))

def get_num_divs(n):
    r = 0
    for i in range (1, int(sqrt(n)) + 1):
        if n % i == 0:
            # perfect squares
            if i == n // i:
                r += 1
            else:
                r += 2
    return r

m = {}
def d(t):
    if t in m:
        return m[t]
    m[t] = get_num_divs(t)
    return m[t]

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