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>
#pragma GCC optimize(2)
#pragma GCC optimize(3)
using namespace std;
inline int read() {
  int x = 0, neg = 1;
  char op = getchar();
  while (!isdigit(op)) {
    if (op == '-') neg = -1;
    op = getchar();
  }
  while (isdigit(op)) {
    x = 10 * x + op - '0';
    op = getchar();
  }
  return neg * x;
}
inline void print(int x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x >= 10) print(x / 10);
  putchar(x % 10 + '0');
}
const int N = 2005;
const int mod = 1 << 30;
int g[N][N];
int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
int pr[N], vis[N], mu[N], len;
void pre(int n) {
  for (register int i = 1; i <= n; i++) {
    for (register int j = 1; j <= n; j++) {
      g[i][j] = gcd(i, j);
    }
  }
  mu[1] = 1;
  for (register int i = 2; i <= n; i++) {
    if (!vis[i]) pr[len++] = i, mu[i] = -1;
    for (register int j = 0; j < len && pr[j] * i <= n; j++) {
      int v = pr[j];
      vis[i * v] = 1;
      if (i % v == 0) break;
      mu[i * v] = -mu[i];
    }
  }
}
int a, b, c;
int ans = 0;
int S(int x, int y) {
  int res = 0;
  for (register int i = 1; i <= y; i++)
    if (g[x][i] == 1) res = (res + y / i) % mod;
  return res;
}
int main() {
  scanf("%d%d%d", &a, &b, &c);
  if (a > b) swap(a, b);
  if (a > c) swap(a, c);
  if (b > c) swap(b, c);
  pre(c);
  for (register int i = 1; i <= a; i++) {
    int ret = 0;
    for (register int G = 1; G <= b; G++) {
      if (g[i][G] != 1 || mu[G] == 0) continue;
      ret = (1ll * ret + 1ll * mu[G] * S(i, b / G) % mod * S(i, c / G) % mod) %
            mod;
    }
    ans = (1ll * ans + 1ll * ret * (a / i) % mod) % mod;
  }
  if (ans < 0) ans += mod;
  printf("%d\n", ans);
  return 0;
}