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;
const double pi = acos(-1.0);
const double eps = 1e-7;
const int inf = 0x3f3f3f3f;
inline long long read() {
  long long f = 1, x = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 1) + (x << 3) + (c ^ 48);
    c = getchar();
  }
  return f * x;
}
const int N = 2e3 + 10, mod = 1073741824;
int g[N][N], prime[N], cnt;
bool st[N];
long long mu[N], a, b, c;
void init() {
  mu[1] = 1;
  for (int i = 2; i < N; i++) {
    if (!st[i]) {
      prime[cnt++] = i;
      mu[i] = -1;
    }
    for (int j = 0; j < cnt && i * prime[j] < N; j++) {
      st[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
      mu[i * prime[j]] = -mu[i];
    }
  }
}
int gcd(int a, int b) {
  if (!b) return a;
  if (g[a][b]) return g[a][b];
  return g[a][b] = gcd(b, a % b);
}
void get_gcd() {
  for (int i = 1; i <= c; i++) {
    for (int j = 1; j <= c; j++) {
      g[i][j] = gcd(i, j);
    }
  }
}
void Sort(long long& a, long long& b, long long& c) {
  long long A = a, B = b, C = c;
  a = min({A, B, C});
  c = max({A, B, C});
  b = A + B + C - a - c;
}
long long f(long long n, long long m) {
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    if (g[i][m] == 1) {
      ans += n / i;
    }
  }
  ans = (ans + mod) % mod;
  return ans;
}
int main() {
  a = read(), b = read(), c = read();
  Sort(a, b, c);
  init();
  get_gcd();
  long long ans = 0;
  for (int i = 1; i <= a; i++) {
    for (int j = 1; j <= b; j++) {
      if (g[i][j] == 1) {
        ans = (ans +
               mu[j] * (a / i) % mod * f(b / j, i) % mod * f(c / j, i) % mod +
               mod) %
              mod;
      }
    }
  }
  cout << ans << '\n';
  return 0;
}