#include <bits/stdc++.h>
using namespace std;
namespace Fread {
const int SIZE = 1 << 26;
char buf[SIZE], *S, *T;
inline char getchar() {
  if (S == T) {
    T = (S = buf) + fread(buf, 1, SIZE, stdin);
    if (S == T) return '\n';
  }
  return *S++;
}
}  // namespace Fread
namespace Fwrite {
const int SIZE = 1 << 26;
char buf[SIZE], *S = buf, *T = buf + SIZE;
inline void flush() {
  fwrite(buf, 1, S - buf, stdout);
  S = buf;
}
inline void putchar(char c) {
  *S++ = c;
  if (S == T) flush();
}
struct NTR {
  ~NTR() { flush(); }
} ztr;
}  // namespace Fwrite
namespace Fastio {
struct Reader {
  template <typename T>
  Reader& operator>>(T& x) {
    char c = Fread ::getchar();
    T f = 1;
    while (c < '0' || c > '9') {
      if (c == '-') f = -1;
      c = Fread ::getchar();
    }
    x = 0;
    while (c >= '0' && c <= '9') {
      x = x * 10 + (c - '0');
      c = Fread ::getchar();
    }
    x *= f;
    return *this;
  }
  Reader& operator>>(char& c) {
    c = Fread ::getchar();
    while (c == '\n' || c == ' ') c = Fread ::getchar();
    return *this;
  }
  Reader& operator>>(char* str) {
    int len = 0;
    char c = Fread ::getchar();
    while (c == '\n' || c == ' ') c = Fread ::getchar();
    while (c != '\n' && c != ' ') {
      str[len++] = c;
      c = Fread ::getchar();
    }
    str[len] = '\0';
    return *this;
  }
  Reader() {}
} cin;
const char endl = '\n';
struct Writer {
  template <typename T>
  Writer& operator<<(T x) {
    if (x == 0) {
      Fwrite ::putchar('0');
      return *this;
    }
    if (x < 0) {
      Fwrite ::putchar('-');
      x = -x;
    }
    static int sta[45];
    int top = 0;
    while (x) {
      sta[++top] = x % 10;
      x /= 10;
    }
    while (top) {
      Fwrite ::putchar(sta[top] + '0');
      --top;
    }
    return *this;
  }
  Writer& operator<<(char c) {
    Fwrite ::putchar(c);
    return *this;
  }
  Writer& operator<<(char* str) {
    int cur = 0;
    while (str[cur]) Fwrite ::putchar(str[cur++]);
    return *this;
  }
  Writer& operator<<(const char* str) {
    int cur = 0;
    while (str[cur]) Fwrite ::putchar(str[cur++]);
    return *this;
  }
  Writer() {}
} cout;
}  // namespace Fastio
long long T, A, B, C;
const long long p = 1 << 30;
long long d[200010];
long long pri[200010], tot, mu[200010];
long long lw[200010];
bool v[200010];
void shai(long long n) {
  mu[1] = d[1] = lw[1] = 1;
  for (long long i = 2; i <= n; i++) {
    if (!v[i]) pri[++tot] = i, mu[i] = -1, d[i] = 2, lw[i] = i;
    for (long long j = 1; j <= tot && i * pri[j] <= n; j++) {
      v[i * pri[j]] = 1;
      if (i % pri[j] == 0) {
        lw[i * pri[j]] = lw[i];
        d[i * pri[j]] = d[i] * 2 - d[i / pri[j]];
        break;
      }
      lw[i * pri[j]] = lw[i] * pri[j];
      mu[i * pri[j]] = -mu[i];
      d[i * pri[j]] = d[i] * d[pri[j]];
    }
  }
  for (long long i = 1; i <= n; i++) mu[i] += mu[i - 1], d[i] += d[i - 1];
}
long long f[200010][10], g[200010][10], s[200010];
long long ans;
void init() {
  g[0][1] = f[0][1] = 0;
  for (long long L = 1, R; L <= A; L = R + 1) {
    R = min(A / (A / L), B / (B / L));
    g[R][1] = mu[R], f[A / L][1] = d[A / L], f[B / L][1] = d[B / L];
  }
  memset(s, 0, sizeof s);
  for (long long i = 1; i <= C; i++) s[lw[i]] += C / i;
  ans = 0;
}
void update(long long x, long long k) {
  for (long long L = 1, R; L <= A; L = R + 1) {
    R = min(A / (A / L), B / (B / L));
    g[R][k] = g[R][k - 1] + g[R / x][k];
    f[A / L][k] = f[A / L][k - 1] - f[A / L / x][k - 1];
    f[B / L][k] = f[B / L][k - 1] - f[B / L / x][k - 1];
  }
}
void dfs(long long x, long long u, long long k) {
  long long dd = 0;
  for (long long L = 1, R; L <= A; L = R + 1) {
    R = min(A / (A / L), B / (B / L));
    dd = (dd + (g[R][k] - g[L - 1][k] + p) * f[A / L][k] % p * f[B / L][k]) % p;
  }
  ans = (ans + s[x] * dd) % p;
  for (long long v = u; (long long)pri[v] * x <= C; v++)
    update(pri[v], k + 1), dfs(x * pri[v], v + 1, k + 1);
}
signed main() {
  shai(200000);
  Fastio ::cin >> A >> B >> C;
  if (A > B) swap(A, B);
  if (A < C) swap(A, C);
  if (A > B) swap(A, B);
  init();
  dfs(1, 1, 1);
  Fastio ::cout << ans << Fastio ::endl;
}
