#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-8;
const int INF = ~1U >> 1;
inline int count_bits(int x) {
  x = (x & 0x55555555) + ((x & 0xaaaaaaaa) >> 1);
  x = (x & 0x33333333) + ((x & 0xcccccccc) >> 2);
  x = (x & 0x0f0f0f0f) + ((x & 0xf0f0f0f0) >> 4);
  x = (x & 0x00ff00ff) + ((x & 0xff00ff00) >> 8);
  x = (x & 0x0000ffff) + ((x & 0xffff0000) >> 16);
  return x;
}
inline int count_bits(long long x) {
  x = (x & 0x5555555555555555LL) + ((x & 0xaaaaaaaaaaaaaaaaLL) >> 1);
  x = (x & 0x3333333333333333LL) + ((x & 0xccccccccccccccccLL) >> 2);
  x = (x & 0x0f0f0f0f0f0f0f0fLL) + ((x & 0xf0f0f0f0f0f0f0f0LL) >> 4);
  x = (x & 0x00ff00ff00ff00ffLL) + ((x & 0xff00ff00ff00ff00LL) >> 8);
  x = (x & 0x0000ffff0000ffffLL) + ((x & 0xffff0000ffff0000LL) >> 16);
  x = (x & 0x00000000ffffffffLL) + ((x & 0xffffffff00000000LL) >> 32);
  return (int)x;
}
int reverse_bits(int x) {
  x = ((x >> 1) & 0x55555555) | ((x << 1) & 0xaaaaaaaa);
  x = ((x >> 2) & 0x33333333) | ((x << 2) & 0xcccccccc);
  x = ((x >> 4) & 0x0f0f0f0f) | ((x << 4) & 0xf0f0f0f0);
  x = ((x >> 8) & 0x00ff00ff) | ((x << 8) & 0xff00ff00);
  x = ((x >> 16) & 0x0000ffff) | ((x << 16) & 0xffff0000);
  return x;
}
long long reverse_bits(long long x) {
  x = ((x >> 1) & 0x5555555555555555LL) | ((x << 1) & 0xaaaaaaaaaaaaaaaaLL);
  x = ((x >> 2) & 0x3333333333333333LL) | ((x << 2) & 0xccccccccccccccccLL);
  x = ((x >> 4) & 0x0f0f0f0f0f0f0f0fLL) | ((x << 4) & 0xf0f0f0f0f0f0f0f0LL);
  x = ((x >> 8) & 0x00ff00ff00ff00ffLL) | ((x << 8) & 0xff00ff00ff00ff00LL);
  x = ((x >> 16) & 0x0000ffff0000ffffLL) | ((x << 16) & 0xffff0000ffff0000LL);
  x = ((x >> 32) & 0x00000000ffffffffLL) | ((x << 32) & 0xffffffff00000000LL);
  return x;
}
template <class T>
inline bool nextInt(T& t) {
  char c;
  T sgn = 1, ret = 0;
  while (c = getchar(),
         c != EOF && c != '+' && c != '-' && !(c >= '0' && c <= '9'))
    ;
  if (c == EOF) return false;
  if (c == '-')
    sgn = -1;
  else if (c >= '0' && c <= '9')
    ret = ((c) ^ 0x30);
  while (c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + ((c) ^ 0x30);
  t = sgn < 0 ? -ret : ret;
  return true;
}
template <class T>
void output(T x) {
  if (x >= 10) output(x / 10);
  putchar(char(((x % 10) | 0x30)));
}
template <class T>
T MOD(T a, T b) {
  a %= b;
  return a < 0 ? a + b : b;
}
const int MAXN = 2001;
const int HashSize = 1 << 23;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int C[MAXN];
bool ss[MAXN] = {1, 1};
int p[MAXN >> 1], plen = 0;
void pre() {
  for (int i = 2; i * i < MAXN; ++i)
    if (!ss[i])
      for (int j = i; j * i < MAXN; ++j) ss[i * j] = 1;
  for (int i = 2; i < MAXN; ++i)
    if (!ss[i]) p[plen++] = i;
  for (int i = 1; i < MAXN; ++i) {
    int ct = 0;
    for (int j = 0; j < plen; ++j)
      if ((i % (p[j] * p[j])) == 0)
        ct = -1;
      else if (ct != -1 && i % p[j] == 0)
        ++ct;
    if (ct < 0)
      C[i] = 0;
    else
      C[i] = (ct % 2) ? -1 : 1;
  }
}
unsigned f(int x, int n) {
  unsigned r = 0;
  for (int i = 1; i <= n; ++i)
    if (gcd(i, x) == 1) r += n / i;
  return r;
}
int main() {
  pre();
  int a, b, c;
  while (cin >> a >> b >> c) {
    unsigned ans = 0;
    for (int i = 1; i <= a; ++i) {
      for (int j = 0; j < MAXN; ++j)
        if (C[j] && gcd(j, i) == 1) {
          ans += (a / i) * C[j] * f(i, b / j) * f(i, c / j);
        }
    }
    cout << (ans & ((1 << 30) - 1)) << endl;
  }
  return 0;
}
