#include <bits/stdc++.h>
using namespace std;
int a, b, c, i, j, ans, x, miu[3000];
int gcd(int x, int y) {
  if (!x) return y;
  return gcd(y % x, x);
}
int ged(int x, int y) {
  int res = 0;
  for (int i = 1; i <= x; i++)
    if (gcd(i, y) == 1) res += x / i;
  return res;
}
int main() {
  scanf("%d%d%d", &a, &b, &c);
  for (miu[1] = 1, i = 2; i <= 2000; i++)
    for (j = 1; j < i; j++)
      if (i % j == 0) miu[i] -= miu[j];
  for (i = 1; i <= a; i++)
    for (x = 1; x <= 2000; x++)
      if (gcd(x, i) == 1)
        ans += miu[x] * (a / i) * ged(b / x, i) * ged(c / x, i);
  printf("%d\n", (ans % (1 << 30) + (1 << 30)) % (1 << 30));
}
