#include <bits/stdc++.h>
long long const maxn = 2000, lots = 1ll << 30ll;
long long squarefree[maxn + 2], gcd[maxn + 2][maxn + 2], factors[maxn + 2],
    factor[maxn + 2];
inline long long term(long long n, long long k) {
  long long res = 0;
  for (long long i = 1; i <= k; i++)
    if (gcd[n][i] == 1) res += k / i;
  return res;
}
int main() {
  for (long long i = 0; i <= maxn; i++)
    for (long long j = 0; j <= maxn; j++)
      gcd[i][j] = gcd[j][i] = (i ? gcd[j % i][i] : j);
  for (long long i = 2; i <= maxn; i++)
    if (not factor[i])
      for (long long j = (factor[i] = i, i * i); j <= maxn; j += i)
        if (not factor[j]) factor[j] = i;
  for (long long i = ++squarefree[1] + 1; i <= maxn; i++)
    factors[i] = factors[i / factor[i]] + 1,
    squarefree[i] =
        (squarefree[i / factor[i]] and (factor[i] != factor[i / factor[i]]));
  long long a, b, c, res = 0;
  std::cin >> a >> b >> c;
  for (long long i = 1; i <= 2000; i++)
    if (squarefree[i])
      for (long long j = 1; j <= a; j++)
        if (gcd[i][j] == 1)
          res += lots + (1 - 2u * (factors[i] & 1)) * (a / j) * term(j, b / i) *
                            term(j, c / i);
  std::cout << (res % lots) << std::endl;
}
