#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0;
  bool flag = 0;
  int ch = getchar();
  while ('0' > ch || ch > '9') {
    if (ch == '-') flag = 1;
    ch = getchar();
  }
  while ('0' <= ch && ch <= '9') {
    x = (x << 1) + (x << 3) + (ch ^ 48);
    ch = getchar();
  }
  return flag ? -x : x;
}
const int maxn = 2010, M = 1 << 30, maxh = 1e7 + 1;
int a, b, c;
int pri[maxn], isn[maxn];
inline void init() {
  int n = max(a, max(b, c));
  isn[1] = 1;
  for (register int i = 2; i <= n; i++) {
    if (!isn[i]) pri[++pri[0]] = i;
    for (register int j = 1; j <= pri[0]; j++) {
      if (pri[j] * i > n) break;
      isn[pri[j] * i] = 1;
      if (i % pri[j] == 0) break;
    }
  }
}
int h[maxh];
long long t[maxh];
int hsh(int x, int y, int z, int p) {
  long long v = 1LL * maxn * maxn * maxn * x + 1LL * maxn * maxn * y +
                1LL * maxn * z + 1LL * p;
  ;
  int w = v % maxh;
  while (h[w] && t[w] != v) w = (w + 1) % maxh;
  if (!h[w]) t[w] = v;
  return w;
}
int dfs(int x, int y, int z, int p, int num) {
  if (x > y) swap(x, y);
  if (y > z) swap(y, z);
  if (x > y) swap(x, y);
  if (num == 0) return 1;
  int H = hsh(x, y, z, p);
  if (h[H]) return h[H];
  int res = 0;
  for (long long i = 0, A = x; A > 0; i++, A /= p) {
    for (long long j = 0, B = y; B > 0; j++, B /= p) {
      for (long long k = 0, C = z; C > 0; k++, C /= p) {
        res = (res + 1LL * dfs(A, B, C, pri[num - 1], num - 1) *
                         (i + j + k + 1LL) % M) %
              M;
      }
    }
  }
  return h[hsh(x, y, z, p)] = res;
}
int main() {
  a = read(), b = read(), c = read();
  init();
  printf("%d", dfs(a, b, c, pri[pri[0]], pri[0]));
  return 0;
}
