Problem: Let's denote d(n) as the number of divisors of a positive integer n. You are given three integers a, b and c. Your task is to calculate the following sum:

<image>

Find the sum modulo 1073741824 (230).

Input

The first line contains three space-separated integers a, b and c (1 ≤ a, b, c ≤ 2000).

Output

Print a single integer — the required sum modulo 1073741824 (230).

Examples

Input

2 2 2


Output

20


Input

4 4 4


Output

328


Input

10 10 10


Output

11536

Note

For the first example.

  * d(1·1·1) = d(1) = 1; 
  * d(1·1·2) = d(2) = 2; 
  * d(1·2·1) = d(2) = 2; 
  * d(1·2·2) = d(4) = 3; 
  * d(2·1·1) = d(2) = 2; 
  * d(2·1·2) = d(4) = 3; 
  * d(2·2·1) = d(4) = 3; 
  * d(2·2·2) = d(8) = 4. 



So the result is 1 + 2 + 2 + 3 + 2 + 3 + 3 + 4 = 20.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using pi = pair<int, int>;
using ll = long long int;
template <typename T1, typename T2, typename T3>
T1 modpow(T1 _a, T2 p, T3 mod) {
  assert(p >= 0);
  ll ret = 1, a = _a;
  if (a < 0) {
    a %= mod;
    a += mod;
  }
  if (a >= mod) {
    a %= mod;
  }
  for (; p > 0; p /= 2) {
    if (p & 1) ret = ret * a % mod;
    a = a * a % mod;
  }
  return ret;
}
constexpr int dx[] = {-1, 0, 1, 0, 1, 1, -1, -1};
constexpr int dy[] = {0, -1, 0, 1, 1, -1, 1, -1};
constexpr auto PI = 3.14159265358979323846L;
constexpr auto oo = numeric_limits<int>::max() / 2 - 2;
constexpr auto eps = 1e-6;
constexpr auto mod = (1 << 30);
constexpr int mx_abc = 2003;
namespace std {
template <class T>
inline void hash_combine(size_t& seed, const T& v) {
  seed ^= hash<T>()(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
}
template <class Tuple, size_t Index = tuple_size<Tuple>::value - 1>
struct HashValueImpl {
  static void apply(size_t& seed, const Tuple& tuple) {
    HashValueImpl<Tuple, Index - 1>::apply(seed, tuple);
    hash_combine(seed, get<Index>(tuple));
  }
};
template <class Tuple>
struct HashValueImpl<Tuple, 0> {
  static void apply(size_t& seed, const Tuple& tuple) {
    hash_combine(seed, std::get<0>(tuple));
  }
};
template <typename... TT>
struct hash<std::tuple<TT...>> {
  size_t operator()(const tuple<TT...>& tt) const {
    size_t seed = 0;
    HashValueImpl<tuple<TT...>>::apply(seed, tt);
    return seed;
  }
};
}  // namespace std
vi primes;
bitset<mx_abc> notprime;
void pre() {
  notprime.reset();
  notprime[0] = notprime[1] = 1;
  for (int i = ((0)), _i = ((mx_abc)-1); i <= _i; ++i)
    if (!notprime[i]) {
      primes.push_back(i);
      for (int j = i * i; j < mx_abc; j += i) notprime[j] = 1;
    }
}
unordered_map<tuple<int, int, int, int>, int> cache;
void normalize(int& a, int& b, int& c) {
  if (b < a) swap(a, b);
  if (c < a) swap(a, c);
  if (c < b) swap(b, c);
}
int get(int p, int limit) {
  if (limit < p) return 0;
  return upper_bound((primes).begin(), (primes).end(), limit) -
         lower_bound((primes).begin(), (primes).end(), p);
}
ll calc(int x, int y) {
  ll ret = 0;
  ret += min(x, y) * (1 + 2);
  ret += (x * y - min(x, y)) * (1 + 1) * (1 + 1);
  return ret;
}
int calc(int x, int y, int z) {
  ll ret = 0;
  int sabc, sab, sac, sbc, s;
  sabc = min(x, min(y, z));
  ret += sabc * (1 + 3);
  sab = min(x, y) * z - sabc;
  ret += sab * (1 + 2) * (1 + 1);
  sac = min(x, z) * y - sabc;
  ret += sac * (1 + 2) * (1 + 1);
  sbc = min(y, z) * x - sabc;
  ret += sbc * (1 + 2) * (1 + 1);
  s = x * y * z - sab - sbc - sac - sabc;
  ret += 1ll * s * (1 + 1) * (1 + 1) * (1 + 1);
  ret += calc(x, y) + calc(x, z) + calc(y, z) + (x + y + z) * (1 + 1) + 1;
  ret %= mod;
  return ret;
}
int solve(int i, int a, int b, int c) {
  if (i == (int((primes).size()))) return 1;
  normalize(a, b, c);
  auto entry = make_tuple(i, a, b, c);
  auto it = cache.find(entry);
  if (it != cache.end()) return it->second;
  int& ret = cache[entry];
  int p = primes[i];
  if (p * p > c) {
    ret = calc(get(p, a), get(p, b), get(p, c));
    return ret;
  }
  ll tmp = 0;
  for (int p1 = 1, c1 = 0; p1 <= a; p1 *= p, ++c1) {
    for (int p2 = 1, c2 = 0; p2 <= b; p2 *= p, ++c2) {
      for (int p3 = 1, c3 = 0; p3 <= c; p3 *= p, ++c3) {
        ret = (ret +
               (1ll + c1 + c2 + c3) * solve(i + 1, a / p1, b / p2, c / p3)) %
              mod;
      }
    }
  }
  return ret;
}
int a, b, c;
int main() {
  pre();
  cin >> a >> b >> c;
  cout << solve(0, a, b, c) << endl;
  return 0;
}