#include <bits/stdc++.h>
using namespace std;
int A, B, C, d[4000010], pr[1000010], tot, p[4000010], cnt[4000010], M[4000010],
    I, id[4000010], Cnt[4000010], P = (1 << 30) - 1;
int f[12000010];
long long ans, s[2001], cc = 2001;
int hashsize = 3999971, T;
vector<pair<long long, int> > V[4000010];
void read(int &x) {
  char ch = getchar();
  int mark = 1;
  for (; ch != '-' && (ch < '0' || ch > '9'); ch = getchar())
    ;
  if (ch == '-') mark = -1, ch = getchar();
  for (x = 0; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - 48;
  x *= mark;
}
int find(int i, int x) {
  int y = (cc * i + x) % hashsize;
  long long z = cc * i + x;
  for (int i = 0; i < V[y].size(); i++)
    if (V[y][i].first == z) return V[y][i].second;
  V[y].push_back(make_pair(z, T++));
  return T - 1;
}
long long F(int i, int x) {
  if (i == 1) return s[x];
  if (x == 1) return d[i];
  if (f[find(i, x)]) return f[find(i, x)];
  return f[find(i, x)] = (((F(i / M[i], x) * (cnt[i] + 1)) & P) -
                          ((F(i / M[i], x / p[i]) * cnt[i]) & P)) &
                         P;
}
int main() {
  read(A);
  read(B);
  read(C);
  d[1] = 1;
  for (int i = 2; i <= 4000000; i++) {
    if (!p[i]) pr[++tot] = i, p[i] = i, d[i] = 2, M[i] = i, cnt[i] = 1;
    for (int j = 1; j <= tot && pr[j] * i <= 4000000; j++) {
      p[pr[j] * i] = pr[j];
      if (i % pr[j] == 0)
        cnt[i * pr[j]] = cnt[i] + 1, M[i * pr[j]] = M[i] * pr[j];
      else
        cnt[i * pr[j]] = 1, M[i * pr[j]] = pr[j];
      d[pr[j] * i] = d[pr[j] * i / M[pr[j] * i]] * (cnt[i * pr[j]] + 1);
      if (p[i] == pr[j]) break;
    }
  }
  for (int i = 1; i <= 2000; i++) s[i] = s[i - 1] + d[i];
  for (int i = 1; i <= A; i++)
    for (int j = 1; j <= B; j++) {
      Cnt[i * j]++;
      if (id[i * j] == 0) id[i * j] = ++I;
    }
  for (int i = A * B; i; i--)
    if (id[i]) (ans += F(i, C) * Cnt[i] & P) &= P;
  printf("%I64d\n", ans);
  return 0;
}

### Prompt

Please formulate a Cpp solution to 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;
int A, B, C, d[4000010], pr[1000010], tot, p[4000010], cnt[4000010], M[4000010],
    I, id[4000010], Cnt[4000010], P = (1 << 30) - 1;
int f[12000010];
long long ans, s[2001], cc = 2001;
int hashsize = 3999971, T;
vector<pair<long long, int> > V[4000010];
void read(int &x) {
  char ch = getchar();
  int mark = 1;
  for (; ch != '-' && (ch < '0' || ch > '9'); ch = getchar())
    ;
  if (ch == '-') mark = -1, ch = getchar();
  for (x = 0; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - 48;
  x *= mark;
}
int find(int i, int x) {
  int y = (cc * i + x) % hashsize;
  long long z = cc * i + x;
  for (int i = 0; i < V[y].size(); i++)
    if (V[y][i].first == z) return V[y][i].second;
  V[y].push_back(make_pair(z, T++));
  return T - 1;
}
long long F(int i, int x) {
  if (i == 1) return s[x];
  if (x == 1) return d[i];
  if (f[find(i, x)]) return f[find(i, x)];
  return f[find(i, x)] = (((F(i / M[i], x) * (cnt[i] + 1)) & P) -
                          ((F(i / M[i], x / p[i]) * cnt[i]) & P)) &
                         P;
}
int main() {
  read(A);
  read(B);
  read(C);
  d[1] = 1;
  for (int i = 2; i <= 4000000; i++) {
    if (!p[i]) pr[++tot] = i, p[i] = i, d[i] = 2, M[i] = i, cnt[i] = 1;
    for (int j = 1; j <= tot && pr[j] * i <= 4000000; j++) {
      p[pr[j] * i] = pr[j];
      if (i % pr[j] == 0)
        cnt[i * pr[j]] = cnt[i] + 1, M[i * pr[j]] = M[i] * pr[j];
      else
        cnt[i * pr[j]] = 1, M[i * pr[j]] = pr[j];
      d[pr[j] * i] = d[pr[j] * i / M[pr[j] * i]] * (cnt[i * pr[j]] + 1);
      if (p[i] == pr[j]) break;
    }
  }
  for (int i = 1; i <= 2000; i++) s[i] = s[i - 1] + d[i];
  for (int i = 1; i <= A; i++)
    for (int j = 1; j <= B; j++) {
      Cnt[i * j]++;
      if (id[i * j] == 0) id[i * j] = ++I;
    }
  for (int i = A * B; i; i--)
    if (id[i]) (ans += F(i, C) * Cnt[i] & P) &= P;
  printf("%I64d\n", ans);
  return 0;
}

```