#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int mod = 1073741824;
const int maxn = 2e3 + 5;
const double PI = acos(-1.0);
const double E = 2.718281828459;
const double eps = 1e-7;
int a, b, c;
int pri[maxn], mo[maxn], flag[maxn], cnt = 0;
int g[maxn][maxn], f[maxn][maxn];
vector<int> fc[maxn];
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
void init() {
  mo[1] = 1;
  for (int i = 2; i < maxn; i++) {
    if (!flag[i]) pri[cnt++] = i, mo[i] = -1 + mod;
    for (int j = 0; j < cnt && i * pri[j] < maxn; j++) {
      flag[i * pri[j]] = 1;
      if (i % pri[j] == 0) break;
      mo[i * pri[j]] = (-mo[i] + mod) % mod;
    }
  }
  for (int i = 1; i < maxn; i++) {
    for (int j = i; j < maxn; j += i) fc[j].push_back(i);
  }
  for (int i = 1; i < maxn; i++) {
    for (int j = 1; j < maxn; j++) g[i][j] = gcd(i, j);
  }
  for (int z = 1; z < maxn; z++) {
    for (int v = 1; v < maxn; v++) {
      int k = 0;
      for (auto j : fc[v]) {
        if (g[j][z] == 1) k++;
      }
      f[v][z] = f[v - 1][z] + k;
    }
  }
}
int main() {
  init();
  cin >> a >> b >> c;
  long long ans = 0;
  for (int z = 1; z <= c; z++) {
    for (int d = 1; d <= min(a, b); d++) {
      if (g[z][d] != 1) continue;
      (ans += c / z * mo[d] % mod * f[a / d][z] % mod * f[b / d][z] % mod) %=
          mod;
    }
  }
  cout << ans << endl;
  return 0;
}
