#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2010, mod = 1073741824;
long long a, b, c, prime[maxn], vis[maxn], tot, mu[maxn], ans;
int G[maxn][maxn];
void init() {
  long long limit = 2000;
  mu[1] = 1;
  for (long long i = 2; i <= limit; i++) {
    if (!vis[i]) {
      prime[++tot] = i;
      mu[i] = -1;
    }
    for (long long j = 1; j <= tot; j++) {
      long long t = prime[j] * i;
      if (t > limit) break;
      vis[t] = 1;
      if (i % prime[j] == 0) {
        mu[t] = 0;
        break;
      }
      mu[t] = -mu[i];
    }
  }
}
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int main() {
  scanf("%I64d%I64d%I64d", &a, &b, &c);
  for (int i = 1; i <= 2000; i++)
    for (int j = 1; j <= 2000; j++) G[i][j] = (gcd(i, j) == 1);
  init();
  for (long long k = 1; k <= c; k++) {
    long long temp = c / k, res = 0;
    for (long long d = 1; d <= min(a, b); d++) {
      long long temp2 = mu[d], sum1 = 0, sum2 = 0;
      for (long long p1 = 1; p1 <= a / d; p1++)
        (sum1 += G[p1 * d][k] * (a / (p1 * d)) % mod) %= mod;
      for (long long p2 = 1; p2 <= b / d; p2++)
        (sum2 += G[p2 * d][k] * (b / (p2 * d)) % mod) %= mod;
      res = (res + 1LL * temp2 * sum1 % mod * sum2 % mod + mod) % mod;
    }
    ans = (ans + 1LL * temp * res % mod) % mod;
  }
  printf("%I64d\n", (ans + mod) % mod);
  return 0;
}
