#include <bits/stdc++.h>
inline int read() {
  char ch = getchar();
  int ret = 0, f = 1;
  while (ch > '9' || ch < '0') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') ret = ret * 10 + ch - '0', ch = getchar();
  return ret * f;
}
const int mx = 2005;
int p[mx], bk[mx], pt, m[mx], m2[mx], g[mx][mx];
inline int gcd(int x, int y) {
  if (g[x][y]) return g[x][y];
  return y ? gcd(y, x % y) : x;
}
inline void sieve(int up) {
  m[1] = 1;
  for (int i = 2; i <= up; i++) {
    if (!bk[i]) p[++pt] = i, m[i] = -1;
    for (int j = 1; j <= pt; j++) {
      if (i * p[j] > up) break;
      bk[i * p[j]] = 1, m[i * p[j]] = -m[i];
      if (i % p[j] == 0) {
        m[i * p[j]] = 0;
        break;
      }
    }
  }
  for (int i = 1; i <= up; i++)
    for (int j = i; j <= up; j++) g[i][j] = g[j][i] = (gcd(i, j) == 1);
}
inline unsigned F(int k, int n, unsigned re = 0) {
  for (int pp = 1; pp <= n; pp++)
    if (g[pp][k] == 1) re += n / pp;
  return re;
}
inline int min(int a, int b) { return a < b ? a : b; }
inline void swap(int &a, int &b) {
  int t = a;
  a = b, b = t;
}
inline void cal(int a, int b, int c, unsigned ans = 0) {
  if (b < c) swap(b, c);
  for (int i = 1; i <= a; i++) {
    for (int j = 1; j <= b && j <= c; j++) {
      m2[j] = m2[j - 1];
      if (g[i][j]) m2[j] += m[j];
    }
    for (int d = 1, ls; d <= b && d <= c; d = ls + 1) {
      ls = min(b / (b / d), c / (c / d));
      if (m2[ls] != m2[d - 1])
        ans += (a / i) * (unsigned)(m2[ls] - m2[d - 1]) * F(i, b / d) *
               F(i, c / d);
    }
  }
  printf("%d\n", ans % (1 << 30));
}
int main() {
  sieve(2000);
  cal(read(), read(), read());
  return 0;
}
