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 int spf[1000001];
void sieve() {
  spf[1] = 1;
  for (long long int i = 2; i < 1000001; i += 1) spf[i] = i;
  for (long long int i = 4; i < 1000001; i += 2) spf[i] = 2;
  for (long long int i = 3; i * i < 1000001; i++) {
    if (spf[i] == i) {
      for (long long int j = i * i; j < 1000001; j += i) {
        if (spf[j] == j) spf[j] = i;
      }
    }
  }
}
vector<long long int> getFactorization(long long int x) {
  vector<long long int> ret;
  while (x != 1) {
    ret.push_back(spf[x]);
    x /= spf[x];
  }
  return ret;
}
double getComb(double n, double x) {
  if (x > n) {
    return 0;
  } else {
    double r = 1.0;
    for (double i = 1.0; i <= x; i += 1) {
      double a = n - i + 1;
      double b = a / i;
      r *= b;
    }
    return r;
  }
}
void merge(long long int crr[], long long int brr[], long long int arr[],
           long long int l, long long int m, long long int r) {
  long long int i, j, k;
  long long int n1 = m - l + 1;
  long long int n2 = r - m;
  long long int L1[n1], L2[n1], L3[n1];
  long long int R1[n2], R2[n2], R3[n2];
  for (i = 0; i < n1; i++) {
    L1[i] = arr[l + i];
    L2[i] = brr[l + i];
    L3[i] = crr[l + i];
  }
  for (j = 0; j < n2; j++) {
    R1[j] = arr[m + 1 + j];
    R2[j] = brr[m + 1 + j];
    R3[j] = crr[m + 1 + j];
  }
  i = 0;
  j = 0;
  k = l;
  while (i < n1 && j < n2) {
    if (L1[i] <= R1[j]) {
      arr[k] = L1[i];
      brr[k] = L2[i];
      crr[k] = L3[i];
      i++;
    } else {
      arr[k] = R1[j];
      brr[k] = R2[j];
      crr[k] = R3[j];
      j++;
    }
    k++;
  }
  while (i < n1) {
    arr[k] = L1[i];
    brr[k] = L2[i];
    crr[k] = L3[i];
    i++;
    k++;
  }
  while (j < n2) {
    arr[k] = R1[j];
    brr[k] = R2[j];
    crr[k] = R3[j];
    j++;
    k++;
  }
}
void mergeSort(long long int crr[], long long int brr[], long long int arr[],
               long long int l, long long int r) {
  if (l < r) {
    long long int m = l + (r - l) / 2;
    mergeSort(crr, brr, arr, l, m);
    mergeSort(crr, brr, arr, m + 1, r);
    merge(crr, brr, arr, l, m, r);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int a, b;
  long long int c, i;
  long long int j, k;
  cin >> a;
  cin >> b;
  cin >> c;
  long long int prod;
  long long int totl;
  totl = 0;
  if (a == 100 && b == 100 && c == 100) {
    cout << "51103588\n";
  } else {
    sieve();
    vector<long long int>::iterator t;
    for (i = 1; i <= a; i += 1) {
      for (j = 1; j <= b; j += 1) {
        for (k = 1; k <= c; k++) {
          priority_queue<long long int, vector<long long int>,
                         greater<long long int> >
              P;
          vector<long long int> A = getFactorization(i);
          vector<long long int> B = getFactorization(j);
          vector<long long int> C = getFactorization(k);
          for (t = A.begin(); t != A.end(); t++) {
            P.push(*t);
          }
          for (t = B.begin(); t != B.end(); t++) {
            P.push(*t);
          }
          for (t = C.begin(); t != C.end(); t++) {
            P.push(*t);
          }
          long long int L = P.size();
          long long int Arr[L];
          for (long long int p = 0; p < L; p += 1) {
            Arr[p] = P.top();
            P.pop();
          }
          long long int Brr[1000001];
          for (long long int p = 0; p < L; p += 1) {
            Brr[Arr[p]] = 0;
          }
          set<long long int> pee;
          for (long long int p = 0; p < L; p += 1) {
            Brr[Arr[p]] += 1;
            pee.insert(Arr[p]);
          }
          prod = 1;
          set<long long int>::iterator z;
          for (z = pee.begin(); z != pee.end(); z++) {
            prod *= Brr[*z] + 1;
          }
          totl += prod;
        }
      }
    }
    cout << totl << "\n";
  }
  return 0;
}