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>
using namespace std;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') f = -1;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  return x * f;
}
void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
void writeln(long long x) {
  write(x);
  puts("");
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const long long N = 2010, mod = 1073741824;
long long pri[N], mark[N], mu[N], g[N][N], n, m, h, mx, ans;
void init(long long n) {
  mu[1] = 1;
  for (long long i = 2; i <= n; ++i) {
    if (!mark[i]) pri[++pri[0]] = i, mu[i] = -1;
    for (long long j = 1; j <= pri[0] && i * pri[j] <= n; ++j) {
      mark[i * pri[j]] = 1;
      if (!(i % pri[j])) {
        mu[i * pri[j]] = 0;
        break;
      }
      mu[i * pri[j]] = -mu[i];
    }
  }
}
int main() {
  n = read();
  m = read();
  h = read();
  if (n > m) swap(n, m);
  init(n);
  mx = max(max(n, m), h);
  for (long long i = 1; i <= mx; ++i)
    for (long long j = 1; j <= mx; ++j) g[i][j] = gcd(i, j);
  for (long long i = 1; i <= h; ++i)
    for (long long d = 1; d <= n; ++d)
      if (gcd(i, d) == 1) {
        long long ans1 = 0, ans2 = 0;
        for (long long j = 1; j <= n / d; ++j)
          if (g[i][j] == 1) ans1 += n / d / j;
        for (long long j = 1; j <= m / d; ++j)
          if (g[i][j] == 1) ans2 += m / d / j;
        ans += ans1 * ans2 % mod * mu[d] * (h / i) % mod;
      }
  writeln((ans + mod) % mod);
}