#include <bits/stdc++.h>
using namespace std;
const int N = 2000 + 5;
const int mod = 1 << 30;
int miu[N], p[N], np[N], mat[N][N];
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
long long inc(long long a, long long b) {
  return a + b - (a + b >= mod ? mod : 0);
}
void pre() {
  miu[1] = 1;
  for (int i = 2; i <= N - 5; i++) {
    if (!np[i]) {
      p[++p[0]] = i;
      miu[i] = -1;
    }
    for (int j = 1; j <= p[0]; j++) {
      int to = p[j] * i;
      if (to > N - 5) break;
      np[to] = 1;
      if (i % p[j] == 0) {
        miu[to] = 0;
        break;
      }
      miu[to] = -miu[i];
    }
  }
  for (int i = 1; i <= N - 5; i++)
    for (int j = 1; j <= N - 5; j++) mat[i][j] = gcd(i, j);
}
int main() {
  pre();
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  int up = min(b, c);
  long long ans = 0;
  for (int i = 1; i <= a; i++) {
    long long tim = a / i;
    for (int j = 1; j <= up; j++) {
      long long s1 = 0, s2 = 0;
      for (int k = j; k <= b; k += j)
        if (mat[k][i] == 1) s1 = inc(b / k, s1);
      for (int k = j; k <= c; k += j)
        if (mat[k][i] == 1) s2 = inc(c / k, s2);
      s1 = (long long)s1 * s2 % mod;
      s1 *= miu[j];
      while (s1 < 0) s1 += mod;
      ans = inc(ans, (long long)s1 * tim % mod);
    }
  }
  printf("%I64d\n", ans);
  return 0;
}
