#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') f = -1;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  return x * f;
}
void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
void writeln(long long x) {
  write(x);
  puts("");
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const long long N = 2010, mod = 1073741824;
long long pri[N], mark[N], mu[N], g[N][N], n, m, h, mx, ans;
void init(long long n) {
  mu[1] = 1;
  for (long long i = 2; i <= n; ++i) {
    if (!mark[i]) pri[++pri[0]] = i, mu[i] = -1;
    for (long long j = 1; j <= pri[0] && i * pri[j] <= n; ++j) {
      mark[i * pri[j]] = 1;
      if (!(i % pri[j])) {
        mu[i * pri[j]] = 0;
        break;
      }
      mu[i * pri[j]] = -mu[i];
    }
  }
}
int main() {
  n = read();
  m = read();
  h = read();
  if (n > m) swap(n, m);
  init(n);
  mx = max(max(n, m), h);
  for (long long i = 1; i <= mx; ++i)
    for (long long j = 1; j <= mx; ++j) g[i][j] = gcd(i, j);
  for (long long i = 1; i <= h; ++i)
    for (long long d = 1; d <= n; ++d)
      if (gcd(i, d) == 1) {
        long long ans1 = 0, ans2 = 0;
        for (long long j = 1; j <= n / d; ++j)
          if (g[i][j] == 1) ans1 += n / d / j;
        for (long long j = 1; j <= m / d; ++j)
          if (g[i][j] == 1) ans2 += m / d / j;
        ans += ans1 * ans2 % mod * mu[d] * (h / i) % mod;
      }
  writeln((ans + mod) % mod);
}
