#include <bits/stdc++.h>
using namespace std;
int prime[2005], miu[2005], v[2005];
int g[2001][2001];
int A, B, C, tot = 0;
long long ans = 0;
void get_miu() {
  miu[1] = 1;
  for (int i = 2; i <= 2001; i++) {
    if (!v[i]) v[i] = 1, miu[i] = -1, prime[++tot] = i;
    for (int j = 1; j <= tot && prime[j] <= (int)(2001 / i); j++) {
      v[prime[j] * i] = 1;
      if (i % prime[j] == 0) {
        miu[i * prime[j]] = 0;
        break;
      } else
        miu[i * prime[j]] = -miu[i];
    }
  }
}
int gcd(int x, int y) { return y == 0 ? x : gcd(y, x % y); }
int main() {
  scanf("%d %d %d", &A, &B, &C);
  int N = max(A, max(B, C));
  get_miu();
  for (int i = 1; i <= 2000; i++)
    for (int j = 1; j <= 2000; j++) g[i][j] = gcd(i, j);
  for (int i = 1; i <= N; i++) {
    for (int j = 1; j <= A; j++)
      if (g[i][j] == 1) {
        int tmp1 = 0, tmp2 = 0;
        for (int k = 1; k <= B / i; k++)
          if (g[j][k] == 1) tmp1 += B / i / k;
        for (int k = 1; k <= C / i; k++)
          if (g[j][k] == 1) tmp2 += C / i / k;
        ans += (long long)(miu[i]) * (long long)(A / j) * (long long)(tmp1) *
               (long long)(tmp2);
      }
  }
  printf("%I64d\n", ans % 1073741824LL);
  return 0;
}
