#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool cmax(T& x, T y) {
  return y > x ? x = y, true : false;
}
template <typename T>
inline bool cmin(T& x, T y) {
  return y < x ? x = y, true : false;
}
const int MAXN = 5005;
int A, B, C, f[MAXN][MAXN], F[MAXN];
short g[MAXN][MAXN];
int prime[MAXN], mu[MAXN], cnt = 0;
bool vis[MAXN];
int calc(int d, int n) {
  if (F[n]) return F[n];
  int sum = 0;
  for (int i = 1, o; i <= n; i = o + 1) {
    o = n / (n / i);
    sum += (f[d][o] - f[d][i - 1]) * (n / i);
  }
  return F[n] = sum;
}
int main() {
  scanf("%d%d%d", &A, &B, &C);
  int n = A;
  cmax(n, B);
  cmax(n, C);
  mu[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (!vis[i]) {
      prime[++cnt] = i;
      mu[i] = -1;
    }
    for (int j = 1; j <= cnt; j++) {
      if (i * prime[j] > n) break;
      vis[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
      mu[i * prime[j]] = -mu[i];
    }
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      if (i == j)
        g[i][j] = i;
      else if (i > j)
        g[i][j] = g[i - j][j];
      else
        g[i][j] = g[i][j - i];
    }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) f[i][j] = f[i][j - 1] + (g[i][j] == 1);
  n = max(B, C);
  int ans = 0;
  for (int i = 1; i <= A; i++) {
    int x = A / i, sum = 0;
    for (int d = 0; d <= n; d++) F[d] = 0;
    for (int d = 1; d <= n; d++)
      if (mu[d] && g[i][d] == 1) sum += mu[d] * calc(i, B / d) * calc(i, C / d);
    ans += sum * x;
  }
  printf("%d\n", ans & ((1 << (30)) - 1));
  return 0;
}
