#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, c = getchar(), f = 0;
  for (; c > '9' || c < '0'; f = c == '-', c = getchar())
    ;
  for (; c >= '0' && c <= '9'; x = (x << 1) + (x << 3) + c - '0', c = getchar())
    ;
  return f ? -x : x;
}
inline void write(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + 48);
}
const int mo = 1073741824, N = 2000 + 10;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int ans, a, b, c, g[N][N], vis[N], u[N], p[N];
int F(int n, int x) {
  int res = 0;
  for (int i = (int)1, _y = n; i <= _y; i++)
    if (g[x][i] == 1) res = (res + n / i) % mo;
  return res;
}
int main() {
  scanf("%d%d%d", &a, &b, &c);
  u[1] = 1;
  vis[1] = 1;
  for (int i = (int)2, _y = 2000; i <= _y; i++) {
    if (!vis[i]) p[++*p] = i, u[i] = -1;
    for (int j = 1; j <= *p && i * p[j] <= 2000; j++) {
      int tmp = i * p[j];
      vis[tmp] = 1;
      if (i % p[j] == 0) {
        u[tmp] = 0;
        break;
      } else
        u[tmp] = -u[i];
    }
  }
  for (int i = (int)1, _y = 2000; i <= _y; i++)
    for (int j = (int)1, _y = 2000; j <= _y; j++) g[i][j] = gcd(i, j);
  for (int i = (int)1, _y = a; i <= _y; i++) {
    int ai = a / i, sum = 0;
    for (int d = (int)1, _y = min(b, c); d <= _y; d++)
      if (g[i][d] == 1)
        sum = (sum + (long long)u[d] * F(b / d, i) * F(c / d, i)) % mo;
    ans = (ans + (long long)ai * sum) % mo;
  }
  printf("%d\n", ans);
}

### Prompt

In cpp, your task is to solve the following 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.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, c = getchar(), f = 0;
  for (; c > '9' || c < '0'; f = c == '-', c = getchar())
    ;
  for (; c >= '0' && c <= '9'; x = (x << 1) + (x << 3) + c - '0', c = getchar())
    ;
  return f ? -x : x;
}
inline void write(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + 48);
}
const int mo = 1073741824, N = 2000 + 10;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int ans, a, b, c, g[N][N], vis[N], u[N], p[N];
int F(int n, int x) {
  int res = 0;
  for (int i = (int)1, _y = n; i <= _y; i++)
    if (g[x][i] == 1) res = (res + n / i) % mo;
  return res;
}
int main() {
  scanf("%d%d%d", &a, &b, &c);
  u[1] = 1;
  vis[1] = 1;
  for (int i = (int)2, _y = 2000; i <= _y; i++) {
    if (!vis[i]) p[++*p] = i, u[i] = -1;
    for (int j = 1; j <= *p && i * p[j] <= 2000; j++) {
      int tmp = i * p[j];
      vis[tmp] = 1;
      if (i % p[j] == 0) {
        u[tmp] = 0;
        break;
      } else
        u[tmp] = -u[i];
    }
  }
  for (int i = (int)1, _y = 2000; i <= _y; i++)
    for (int j = (int)1, _y = 2000; j <= _y; j++) g[i][j] = gcd(i, j);
  for (int i = (int)1, _y = a; i <= _y; i++) {
    int ai = a / i, sum = 0;
    for (int d = (int)1, _y = min(b, c); d <= _y; d++)
      if (g[i][d] == 1)
        sum = (sum + (long long)u[d] * F(b / d, i) * F(c / d, i)) % mo;
    ans = (ans + (long long)ai * sum) % mo;
  }
  printf("%d\n", ans);
}

```