#include <bits/stdc++.h>
using namespace std;
int n, m, K;
int mo[2005];
int vis[2005];
int Pri[2005];
int mark[2005][2005];
int GCD(int a, int b) {
  if (mark[a][b]) return mark[a][b];
  if (!b) return a;
  int t = GCD(b, a % b);
  return mark[a][b] = mark[b][a] = t;
}
void Init() {
  int top = 0;
  mo[1] = 1;
  for (int i = (2), i_end_ = (2005 - 5); i <= i_end_; i++) {
    if (!vis[i]) {
      Pri[++top] = i;
      mo[i] = -1;
    }
    for (int j = 1; j <= top && Pri[j] * i <= 2005 - 5; j++) {
      int t = Pri[j] * i;
      vis[t] = 1;
      if (i % Pri[j])
        mo[t] = -mo[i];
      else {
        mo[t] = 0;
        break;
      }
    }
  }
}
int main() {
  Init();
  scanf("%d%d%d", &n, &m, &K);
  long long ans = 0;
  for (int k = (1), k_end_ = (K); k <= k_end_; k++) {
    long long tot = 0;
    for (int d = (1), d_end_ = (min(n, m)); d <= d_end_; d++) {
      if (!mo[d]) continue;
      long long res1 = 0, res2 = 0;
      for (int i = (1), i_end_ = (n / d); i <= i_end_; i++) {
        res1 = res1 + (n / d / i) * (GCD(d * i, k) == 1);
        res1 %= 1073741824;
      }
      for (int j = (1), j_end_ = (m / d); j <= j_end_; j++) {
        res2 = res2 + (m / d / j) * (GCD(d * j, k) == 1);
        res2 %= 1073741824;
      }
      tot = (tot + res1 * res2 * mo[d]) % 1073741824;
    }
    ans = (ans + tot * (K / k)) % 1073741824;
  }
  printf("%lld\n", ans);
  return 0;
}
