#include <bits/stdc++.h>
using namespace std;
const unsigned long long N = 500005;
const unsigned long long modd = 1073741824;
unsigned long long check[N + 5];
unsigned long long mu[N + 5], p[N + 5];
bool flg[N + 5];
unsigned long long g[2002][2002];
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  if (g[a][b])
    return g[a][b];
  else
    return g[a][b] = g[b][a] = (b ? gcd(b, a % b) : a);
}
void mobius() {
  unsigned long long tot = 0;
  mu[1] = 1;
  for (unsigned long long i = 2; i <= N; ++i) {
    if (!flg[i]) {
      p[++tot] = i;
      mu[i] = -1;
    }
    for (unsigned long long j = 1; j <= tot && i * p[j] <= N; ++j) {
      flg[i * p[j]] = 1;
      if (i % p[j] == 0) {
        mu[i * p[j]] = 0;
        break;
      }
      mu[i * p[j]] = -mu[i];
    }
  }
}
unsigned long long solve(unsigned long long a, unsigned long long b,
                         unsigned long long c) {
  if (!g[a][b]) gcd(a, b);
  if (g[a][b] != 1) return 0;
  unsigned long long res = 0;
  for (unsigned long long i = 1; i <= c / a; i++) {
    if (!g[i][b]) gcd(i, b);
    if (g[i][b] != 1) continue;
    res += c / (i * a);
    res %= modd;
  }
  return res;
}
int main() {
  mobius();
  unsigned long long a, b, c;
  cin >> a >> b >> c;
  unsigned long long ans = 0;
  if (a > b) swap(a, b);
  if (a > c) swap(a, c);
  if (b > c) swap(b, c);
  for (unsigned long long i = 1; i <= a; i++) {
    for (unsigned long long j = 1; j <= min(b, c); j++) {
      if (g[i][j] == 0) gcd(i, j);
      if (g[i][j] == 1) {
        ans += (a / i % modd) * (mu[j]) *
               ((solve(j, i, b) % modd) * (solve(j, i, c) % modd)) % modd;
        ans %= modd;
      }
    }
  }
  cout << ans << endl;
}
