#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
const double eps = 1e-5;
const long long mod = 1LL << 30;
bitset<N + 5> isprim;
int prim[N], d;
int mu[N + 5], sum[N + 5];
void moblus() {
  isprim.reset();
  mu[1] = 1;
  d = 0;
  for (int i = 2; i <= N; i++) {
    if (!isprim[i]) prim[d++] = i, mu[i] = -1;
    for (int j = 0; j < d; j++) {
      if (i * prim[j] > N) break;
      isprim.set(i * prim[j]);
      if (i % prim[j] == 0) {
        mu[i * prim[j]] = 0;
        break;
      } else
        mu[i * prim[j]] = -mu[i];
    }
  }
  sum[0] = 0;
  for (int i = 1; i <= N; i++) sum[i] = sum[i - 1] + mu[i];
}
int gcd[2005][2005];
int nex[2005][2005];
int f[2005][2005];
long long Num(int n, int m) {
  if (!f[n][m])
    for (int i = 1; i <= m; i = nex[n][i]) f[n][m] += m / i;
  return f[n][m];
}
long long solve(int a, int b, int c, int n) {
  long long ans = 0;
  for (int i = 1; i <= n; i++)
    if (mu[i]) {
      long long cur = 0;
      for (int j = 1; j <= a; j = nex[i][j])
        cur += (a / j) * Num(j, b / i) * Num(j, c / i);
      ans += mu[i] * cur;
    }
  return ans % mod;
}
int main() {
  moblus();
  for (int i = 0; i <= 2000; i++) gcd[0][i] = gcd[i][0] = i;
  for (int i = 1; i <= 2000; i++) {
    int last = 1;
    for (int j = 1; j <= 2000; j++) {
      if (i < j)
        gcd[i][j] = gcd[i][j - i];
      else
        gcd[i][j] = gcd[i - j][j];
      if (j != 1 && gcd[i][j] == 1) nex[i][last] = j, last = j;
    }
    nex[i][last] = 2222;
  }
  int a, b, c;
  while (~scanf("%d%d%d", &a, &b, &c)) {
    printf("%I64d\n", solve(a, b, c, min(b, c)));
  }
  return 0;
}
