#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T next_num() {
  T i = 0;
  char c;
  while (!isdigit(c = getchar()) && c != '-')
    ;
  bool flag = c == '-';
  flag ? (c = getchar()) : 0;
  while (i = i * 10 - '0' + c, isdigit(c = getchar()))
    ;
  return flag ? -i : i;
}
template <class T1, class T2>
inline void apmin(T1 &a, const T2 &b) {
  if (b < a) {
    a = b;
  }
}
template <class T1, class T2>
inline void apmax(T1 &a, const T2 &b) {
  if (a < b) {
    a = b;
  }
}
const int N = 5010;
unsigned int prime[N], ps = 0;
bool np[N];
unsigned int mu[N], _mu[N][N], R[N], mnp[N], lnk[N];
inline unsigned int getR(int n) {
  unsigned int ans = 0;
  for (int l = 1, x, r; l <= n; l = r + 1) {
    x = n / l, r = n / x;
    ans += x * (r - l + 1);
  }
  return ans;
}
inline void sieve(unsigned int n) {
  memset(np, 0, sizeof(np));
  mu[1] = R[1] = 1;
  for (unsigned int i = 2; i <= n; i++) {
    if (!np[i]) {
      prime[ps++] = i;
      mnp[i] = i, mu[i] = -1, lnk[i] = 1;
    }
    R[i] = getR(i);
    for (unsigned int j = 0, cur = 2, num = i << 1; j < ps && num <= n;
         num = i * (cur = prime[++j])) {
      np[num] = true, mnp[num] = cur;
      if (i % cur == 0) {
        mu[num] = 0, lnk[num] = lnk[i];
        break;
      } else {
        mu[num] = -mu[i], lnk[num] = i;
      }
    }
  }
  for (unsigned int i = 1; i <= n; i++) {
    _mu[i][1] = mu[i];
    for (unsigned int j = 2; i * j <= n; j++) {
      _mu[i][j] = _mu[i][j - 1] + mu[i * j];
    }
  }
}
unsigned int A, B, C;
unsigned int vec[32];
inline unsigned int fact(int x) {
  int qt = 0;
  vec[qt++] = 1;
  for (; x != 1; x = lnk[x]) {
    for (int i = 0, p = mnp[x], tn = qt; i < tn; i++) {
      vec[qt++] = vec[i] * p;
    }
  }
  return qt;
}
inline unsigned int F(int n, int x) {
  unsigned int ans = 0;
  for (int i = 0, tn = fact(x); i < tn; i++) {
    ans += mu[vec[i]] * R[n / vec[i]];
  }
  return ans;
}
inline unsigned int G(unsigned int B, unsigned int C, unsigned int i,
                      unsigned int d) {
  unsigned int ans = 0;
  for (unsigned int l = 1, x1, x2, r; l <= B; l = r + 1) {
    x1 = B / l, x2 = C / l, r = min(B / x1, C / x2);
    ans += (_mu[d][r] - _mu[d][l - 1]) * F(x1, i) * F(x2, i);
  }
  return ans;
}
unsigned int gcd(unsigned int a, unsigned int b) {
  return b == 0 ? a : gcd(b, a % b);
}
inline unsigned int H(int i) {
  unsigned int ans = 0;
  for (int j = 0, tn = fact(i); j < tn; j++) {
    ans += G(B / vec[j], C / vec[j], i, vec[j]) * mu[vec[j]];
  }
  return ans;
}
inline void sortabc() {
  if (A > B) {
    swap(A, B);
  }
  if (B > C) {
    swap(B, C);
  }
  if (A > B) {
    swap(A, B);
  }
}
int main() {
  A = (next_num<int>()), B = (next_num<int>()), C = (next_num<int>()),
  sortabc(), sieve(C);
  unsigned int ans = 0;
  for (unsigned int i = 1; i <= A; i++) {
    ans += A / i * H(i);
  }
  printf("%u\n", ans & ((1 << 30) - 1));
}
