#include <bits/stdc++.h>
unsigned int mu[10004], Smu[10004], cp[10004], Scp[10004], ans;
int a, b, c, n, prime[10004], tl, not_prime[10004];
void calc_mu() {
  mu[1] = 1;
  for (int i = 2; i <= n; ++i) {
    if (!not_prime[i]) {
      prime[++tl] = i;
      mu[i] = -1;
    }
    for (int j = 1; j <= tl && i * prime[j] <= n; ++j) {
      not_prime[i * prime[j]] = 1;
      if (i % prime[j] == 0) {
        mu[i * prime[j]] = 0;
        break;
      } else
        mu[i * prime[j]] = -mu[i];
    }
  }
  for (int i = 1; i <= n; ++i) Smu[i] = Smu[i - 1] + mu[i];
}
void calc_coprime(int x) {
  for (int i = 1; i <= n; ++i) cp[i] = 0;
  cp[1] = 1;
  for (int i = 2; i <= n; ++i) {
    if (!not_prime[i]) {
      cp[i] = (x % i != 0);
      for (int j = i * i; j <= n; j *= i) {
        cp[j] = cp[i];
      }
    }
    for (int j = 1; j <= tl && prime[j] < i && i * prime[j] <= n; ++j) {
      cp[i * prime[j]] = cp[i] * cp[prime[j]];
      if (i % prime[j] == 0)
        break;
      else
        cp[i * prime[j]] = cp[i] * cp[prime[j]];
    }
  }
  for (int i = 1; i <= n; ++i) Scp[i] = Scp[i - 1] + cp[i];
}
unsigned int W(int k) {
  unsigned int ans = 0;
  for (int l = 1, r; l <= k; l = r + 1) {
    r = k / (k / l);
    ans += (Scp[r] - Scp[l - 1]) * (k / l);
  }
  return ans;
}
int main() {
  scanf("%d%d%d", &a, &b, &c);
  n = std::max({a, b, c});
  calc_mu();
  for (int i = 1; i <= a; ++i) {
    unsigned int coef = a / i;
    calc_coprime(i);
    int px = 0, py = 0, pans = 0;
    for (int d = 1; d <= n; ++d) {
      if ((!cp[d]) || (!mu[d])) continue;
      int x = b / d, y = c / d;
      unsigned int res;
      if (x != px || y != py) {
        res = W(x) * W(y);
        px = x;
        py = y;
        pans = res;
      } else
        res = pans;
      ans += res * mu[d] * coef;
    }
  }
  std::cout << ans % 1073741824;
  return 0;
}
