#include <bits/stdc++.h>
#pragma GCC optimize(2)
#pragma GCC optimize(3)
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-7;
const int inf = 0x3f3f3f3f;
inline long long read() {
  long long f = 1, x = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 1) + (x << 3) + (c ^ 48);
    c = getchar();
  }
  return f * x;
}
const int N = 2e3 + 10, mod = 1073741824;
int g[N][N], prime[N], cnt;
bool st[N];
long long mu[N], a, b, c;
void init() {
  mu[1] = 1;
  for (int i = 2; i < N; i++) {
    if (!st[i]) {
      prime[cnt++] = i;
      mu[i] = -1;
    }
    for (int j = 0; j < cnt && i * prime[j] < N; j++) {
      st[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
      mu[i * prime[j]] = -mu[i];
    }
  }
}
int gcd(int a, int b) {
  if (!b) return a;
  if (g[a][b]) return g[a][b];
  return g[a][b] = gcd(b, a % b);
}
void get_gcd() {
  for (int i = 1; i <= c; i++) {
    for (int j = 1; j <= c; j++) {
      g[i][j] = gcd(i, j);
    }
  }
}
void Sort(long long& a, long long& b, long long& c) {
  long long A = a, B = b, C = c;
  a = min({A, B, C});
  c = max({A, B, C});
  b = A + B + C - a - c;
}
long long f(long long n, long long m) {
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    if (g[i][m] == 1) {
      ans += n / i;
    }
  }
  ans = (ans + mod) % mod;
  return ans;
}
int main() {
  a = read(), b = read(), c = read();
  Sort(a, b, c);
  init();
  get_gcd();
  long long ans = 0;
  for (int i = 1; i <= a; i++) {
    for (int j = 1; j <= b; j++) {
      if (g[i][j] == 1) {
        ans = (ans +
               mu[j] * (a / i) % mod * f(b / j, i) % mod * f(c / j, i) % mod +
               mod) %
              mod;
      }
    }
  }
  cout << ans << '\n';
  return 0;
}
