#include <bits/stdc++.h>
using namespace std;
const int maxn = 2001;
int pri[maxn], mu[maxn], tot = 0;
bool isp[maxn];
int g[maxn][maxn];
inline int gcd(int a, int b) {
  if (a < b) swap(a, b);
  if (g[a][b]) return g[a][b];
  if (b == 0)
    return g[a][b] = a;
  else
    return g[a][b] = gcd(b, a % b);
}
inline void getpri() {
  mu[1] = 1;
  for (int i = 2; i < maxn; i++) {
    if (!isp[i]) {
      pri[tot++] = i;
      mu[i] = -1;
    }
    for (int j = 0; j < tot; j++) {
      if (i * pri[j] >= maxn) break;
      isp[i * pri[j]] = 1;
      if (i % pri[j] == 0) {
        mu[i * pri[j]] = 0;
        break;
      }
      mu[i * pri[j]] = -mu[i];
    }
  }
}
int main() {
  getpri();
  unsigned int ans = 0;
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  if (c > b) swap(b, c);
  if (c > a) swap(a, c);
  if (b > a) swap(a, b);
  for (int d = 1; d <= b; d++)
    if (mu[d] != 0)
      for (int i = 1; i <= a; i++)
        if (gcd(d, i) == 1) {
          int u = 0, v = 0;
          for (register int x = 1, y = d; y <= b; x++, y += d)
            if (gcd(x, i) == 1) u += b / y, v += c / y;
          ans += mu[d] * (a / i) * u * v;
        }
  printf("%d\n", ans & 0x3fffffff);
  return 0;
}
