#include <bits/stdc++.h>
using namespace std;
const int n = 2000;
int miu[2005], pri[2005], deg[2005], cnt = 0, num = 0;
int f1[2005], f2[2005], f3[2005], gu[2005];
int p[2005], id[2005], co[2005];
int vis[2005];
bool isp[2005];
vector<int> vec[2005];
vector<int> val[2005];
struct edge {
  int a, b, val;
} e[10005];
inline bool cmp(int a, int b) { return deg[a] < deg[b]; }
inline int gcd(int a, int b) {
  while (a % b) a %= b, swap(a, b);
  return b;
}
inline int mul(int a, int b, int c) {
  if ((!a) || (!b) || (!c)) return 0;
  if (b ^ 1) a = 1ll * a * b % 1073741824;
  if (c ^ 1) a = 1ll * a * c % 1073741824;
  return a;
}
inline void getp() {
  miu[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (!isp[i]) {
      miu[i] = -1;
      pri[++cnt] = i;
    }
    for (int j = 1; j <= cnt && i * pri[j] <= n; j++) {
      isp[i * pri[j]] = 1;
      miu[i * pri[j]] = -miu[i];
      if (i % pri[j] == 0) {
        miu[i * pri[j]] = 0;
        break;
      }
    }
  }
}
int main() {
  int i, j, k;
  getp();
  for (i = 1; i * i <= n; i++) {
    if (!miu[i]) continue;
    for (j = i; i * j <= n; j++) {
      if (!miu[j]) continue;
      if (gcd(i, j) != 1) continue;
      for (k = 1; i * j * k <= n; k++) {
        if ((!miu[i * k]) || (!miu[j * k])) continue;
        e[++num].a = i * k;
        deg[i * k]++;
        e[num].b = j * k;
        deg[j * k]++;
        e[num].val = i * j * k;
      }
    }
  }
  for (i = 1; i <= n; i++) p[i] = i;
  sort(p + 1, p + n + 1, cmp);
  for (i = 1; i <= n; i++) id[p[i]] = i;
  memset(deg, 0, sizeof(deg));
  for (i = 1; i <= num; i++) {
    if (id[e[i].a] > id[e[i].b]) swap(e[i].a, e[i].b);
    deg[e[i].a]++;
  }
  for (i = 1; i <= n; i++) {
    vec[i].resize(deg[i]);
    val[i].resize(deg[i]);
  }
  for (i = 1; i <= num; i++) {
    vec[e[i].a][co[e[i].a]] = e[i].b;
    val[e[i].a][co[e[i].a]] = e[i].val;
    co[e[i].a]++;
  }
  int test, a, b, c;
  test = 1;
  while (test--) {
    int ans = 0, maxn, maxx;
    scanf("%d%d%d", &a, &b, &c);
    maxx = max(max(a, b), c);
    maxn = a + b + c - maxx - min(min(a, b), c);
    for (i = 1; i <= a; i++) {
      for (j = i; j <= a; j += i) f1[i] += (a / j);
    }
    for (i = 1; i <= b; i++) {
      for (j = i; j <= b; j += i) f2[i] += (b / j);
    }
    for (i = 1; i <= c; i++) {
      for (j = i; j <= c; j += i) f3[i] += (c / j);
    }
    for (i = 1; i <= maxn; i++) {
      int t1 = i, t2, t3;
      for (j = 0; j < deg[i]; j++) {
        if (vec[i][j] > maxn) continue;
        if (val[i][j] > maxx) continue;
        vis[vec[i][j]] = i;
        gu[vec[i][j]] = val[i][j];
      }
      for (j = 0; j < deg[i]; j++) {
        t2 = vec[i][j];
        if (t2 > maxn) continue;
        if (val[i][j] > maxx) continue;
        for (k = 0; k < deg[t2]; k++) {
          t3 = vec[t2][k];
          if (t3 > maxn) continue;
          if (vis[t3] != i) continue;
          if (val[t2][k] > maxx) continue;
          int k1 = val[i][j], k2 = gu[t3], k3 = val[t2][k], p1 = t1, p2 = t2,
              p3 = t3;
          if (p1 == p3) swap(p2, p3), swap(k1, k2);
          if (p2 == p3) swap(p1, p3), swap(k1, k3);
          int o = miu[p1] * miu[p2] * miu[p3], res = 0;
          if (p1 == p2 && p2 == p3) res = mul(f1[k1], f2[k2], f3[k3]);
          if (p1 == p2 && p2 != p3) {
            res += mul(f1[k1], f2[k2], f3[k3]);
            res &= 1073741823;
            res += mul(f1[k2], f2[k1], f3[k3]);
            res &= 1073741823;
            res += mul(f1[k2], f2[k3], f3[k1]);
            res &= 1073741823;
          }
          if (p1 != p2 && p2 != p3) {
            res += mul(f1[k1], f2[k2], f3[k3]);
            res &= 1073741823;
            res += mul(f1[k1], f2[k3], f3[k2]);
            res &= 1073741823;
            res += mul(f1[k2], f2[k1], f3[k3]);
            res &= 1073741823;
            res += mul(f1[k2], f2[k3], f3[k1]);
            res &= 1073741823;
            res += mul(f1[k3], f2[k1], f3[k2]);
            res &= 1073741823;
            res += mul(f1[k3], f2[k2], f3[k1]);
            res &= 1073741823;
          }
          if (o == 1) {
            ans =
                (ans + res >= 1073741824 ? ans + res - 1073741824 : ans + res);
          } else {
            ans = (ans - res < 0 ? ans - res + 1073741824 : ans - res);
          }
        }
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
