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;
const int N = 2000 + 5;
const int mod = 1 << 30;
int miu[N], p[N], np[N], mat[N][N];
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
long long inc(long long a, long long b) {
  return a + b - (a + b >= mod ? mod : 0);
}
void pre() {
  miu[1] = 1;
  for (int i = 2; i <= N - 5; i++) {
    if (!np[i]) {
      p[++p[0]] = i;
      miu[i] = -1;
    }
    for (int j = 1; j <= p[0]; j++) {
      int to = p[j] * i;
      if (to > N - 5) break;
      np[to] = 1;
      if (i % p[j] == 0) {
        miu[to] = 0;
        break;
      }
      miu[to] = -miu[i];
    }
  }
  for (int i = 1; i <= N - 5; i++)
    for (int j = 1; j <= N - 5; j++) mat[i][j] = gcd(i, j);
}
int main() {
  pre();
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  int up = min(b, c);
  long long ans = 0;
  for (int i = 1; i <= a; i++) {
    long long tim = a / i;
    for (int j = 1; j <= up; j++) {
      long long s1 = 0, s2 = 0;
      for (int k = j; k <= b; k += j)
        if (mat[k][i] == 1) s1 = inc(b / k, s1);
      for (int k = j; k <= c; k += j)
        if (mat[k][i] == 1) s2 = inc(c / k, s2);
      s1 = (long long)s1 * s2 % mod;
      s1 *= miu[j];
      while (s1 < 0) s1 += mod;
      ans = inc(ans, (long long)s1 * tim % mod);
    }
  }
  printf("%I64d\n", ans);
  return 0;
}