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>
using namespace std;
template <typename T>
inline bool cmax(T& x, T y) {
  return y > x ? x = y, true : false;
}
template <typename T>
inline bool cmin(T& x, T y) {
  return y < x ? x = y, true : false;
}
const int MAXN = 5005;
int A, B, C, f[MAXN][MAXN], F[MAXN];
short g[MAXN][MAXN];
int prime[MAXN], mu[MAXN], cnt = 0;
bool vis[MAXN];
int calc(int d, int n) {
  if (vis[n]) return F[n];
  int sum = 0, tmp;
  vis[n] = 1;
  for (int i = 1, o; i <= n; i = o + 1) {
    tmp = n / i;
    o = n / tmp;
    sum += (f[d][o] - f[d][i - 1]) * tmp;
  }
  return F[n] = sum;
}
int num[MAXN], siz = 0;
int main() {
  scanf("%d%d%d", &A, &B, &C);
  int n = A;
  cmax(n, B);
  cmax(n, C);
  mu[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (!vis[i]) {
      prime[++cnt] = i;
      mu[i] = -1;
    }
    for (int j = 1; j <= cnt; j++) {
      if (i * prime[j] > n) break;
      vis[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
      mu[i * prime[j]] = -mu[i];
    }
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      if (i == j)
        g[i][j] = i;
      else if (i > j)
        g[i][j] = g[i - j][j];
      else
        g[i][j] = g[i][j - i];
    }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) f[i][j] = f[i][j - 1] + (g[i][j] == 1);
  n = min(B, C);
  int m = max(B, C);
  int ans = 0;
  for (int i = 1; i <= n; i++)
    if (mu[i]) num[++siz] = i;
  for (int i = 1; i <= A; i++) {
    int x = A / i, sum = 0;
    memset(F + 1, 0, sizeof(int) * m);
    memset(vis + 1, 0, sizeof(bool) * m);
    for (int d = 1; d <= siz; d++)
      if (mu[num[d]] && g[i][num[d]] == 1)
        sum += mu[num[d]] * calc(i, B / num[d]) * calc(i, C / num[d]);
    ans += sum * x;
  }
  printf("%d\n", ans & ((1 << (30)) - 1));
  return 0;
}