#include <bits/stdc++.h>
using namespace std;
const int N = 2020, M = 310, B1 = 12, B2 = B1 + B1, S = (1 << 12) - 1,
          Bitmod = (1 << 30) - 1;
const long long One = 1ll | (1ll << B1) | (1ll << B2);
int p[M] = {}, m = 0;
unordered_map<long long, long long> f[M] = {};
long long a, b, c;
void get_prime(int v) {
  bool d[N] = {};
  for (int i = 2; i <= v; ++i) {
    if (!d[i]) p[++m] = i;
    for (int j = 1; j <= m && i * p[j] <= v; ++j) {
      int t = i * p[j];
      d[t] = true;
      if (i % p[j] == 0) break;
    }
  }
  reverse(p + 1, p + m + 1);
}
long long calc(int a, int b, int c, int d) {
  if (a < b) swap(a, b);
  if (a < c) swap(a, c);
  if (b < c) swap(b, c);
  if (d > m) return 1ll;
  long long s = a | (b << B1) | (((long long)c) << B2);
  if (f[d].count(s)) return f[d][s];
  long long sum = 0;
  for (int x = 0, vx = c; vx; ++x, vx /= p[d])
    for (int y = 0, vy = b; vy; ++y, vy /= p[d])
      for (int z = 0, vz = a; vz; ++z, vz /= p[d])
        sum += (x + y + z + 1) * calc(vx, vy, vz, d + 1);
  return f[d][s] = sum & Bitmod;
}
int main() {
  cin >> a >> b >> c;
  cerr << "time=" << clock() << endl;
  if (a < b) swap(a, b);
  if (a < c) swap(a, c);
  if (b < c) swap(b, c);
  get_prime(a);
  cout << calc(a, b, c, 1) << endl;
  int ans = 0;
  for (int i = 1; i <= m; ++i) ans += f[i].size();
  cerr << "m=" << m << endl;
  cerr << ans << endl;
  cerr << "time=" << clock() << endl;
  return 0;
}
