#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 (F[n]) return F[n];
  int sum = 0;
  for (int i = 1, o; i <= n; i = o + 1) {
    o = n / (n / i);
    sum += (f[d][o] - f[d][i - 1]) * (n / i);
  }
  return F[n] = sum;
}
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 = max(B, C);
  int ans = 0;
  for (int i = 1; i <= A; i++) {
    int x = A / i, sum = 0;
    for (int d = 0; d <= n; d++) F[d] = 0;
    for (int d = 1; d <= n; d++)
      if (mu[d] && g[i][d] == 1) sum += mu[d] * calc(i, B / d) * calc(i, C / d);
    ans += sum * x;
  }
  printf("%d\n", ans & ((1 << (30)) - 1));
  return 0;
}

### Prompt

Develop a solution in cpp to the problem described below:

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.

### Response

```cpp
#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 (F[n]) return F[n];
  int sum = 0;
  for (int i = 1, o; i <= n; i = o + 1) {
    o = n / (n / i);
    sum += (f[d][o] - f[d][i - 1]) * (n / i);
  }
  return F[n] = sum;
}
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 = max(B, C);
  int ans = 0;
  for (int i = 1; i <= A; i++) {
    int x = A / i, sum = 0;
    for (int d = 0; d <= n; d++) F[d] = 0;
    for (int d = 1; d <= n; d++)
      if (mu[d] && g[i][d] == 1) sum += mu[d] * calc(i, B / d) * calc(i, C / d);
    ans += sum * x;
  }
  printf("%d\n", ans & ((1 << (30)) - 1));
  return 0;
}

```