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

<image>

Find the sum modulo 1073741824 (230).

Input

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

Output

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

Examples

Input

2 2 2


Output

20


Input

4 4 4


Output

328


Input

10 10 10


Output

11536

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.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
inline int read() {
  char ch = getchar();
  int ret = 0, f = 1;
  while (ch > '9' || ch < '0') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') ret = ret * 10 + ch - '0', ch = getchar();
  return ret * f;
}
const int mx = 2005;
int p[mx], bk[mx], pt, m[mx], m2[mx], g[mx][mx];
inline int gcd(int x, int y) {
  if (g[x][y]) return g[x][y];
  return y ? gcd(y, x % y) : x;
}
inline void sieve(int up) {
  m[1] = 1;
  for (int i = 2; i <= up; i++) {
    if (!bk[i]) p[++pt] = i, m[i] = -1;
    for (int j = 1; j <= pt; j++) {
      if (i * p[j] > up) break;
      bk[i * p[j]] = 1, m[i * p[j]] = -m[i];
      if (i % p[j] == 0) {
        m[i * p[j]] = 0;
        break;
      }
    }
  }
  for (int i = 1; i <= up; i++)
    for (int j = i; j <= up; j++) g[i][j] = g[j][i] = (gcd(i, j) == 1);
}
inline unsigned F(int k, int n, unsigned re = 0) {
  for (int pp = 1; pp <= n; pp++)
    if (g[pp][k] == 1) re += n / pp;
  return re;
}
inline int min(int a, int b) { return a < b ? a : b; }
inline void swap(int &a, int &b) {
  int t = a;
  a = b, b = t;
}
inline void cal(int a, int b, int c, unsigned ans = 0) {
  if (b < c) swap(b, c);
  for (int i = 1; i <= a; i++) {
    for (int j = 1; j <= b && j <= c; j++) {
      m2[j] = m2[j - 1];
      if (g[i][j]) m2[j] += m[j];
    }
    for (int d = 1, ls; d <= b && d <= c; d = ls + 1) {
      ls = min(b / (b / d), c / (c / d));
      if (m2[ls] != m2[d - 1])
        ans += (a / i) * (unsigned)(m2[ls] - m2[d - 1]) * F(i, b / d) *
               F(i, c / d);
    }
  }
  printf("%d\n", ans % (1 << 30));
}
int main() {
  sieve(2000);
  cal(read(), read(), read());
  return 0;
}