#include <bits/stdc++.h>
using namespace std;

int gcd(int n, int m) {return (m == 0? n : gcd(m, n % m));}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  int w, h, c;
  cin >> w >> h >> c;

  int g = gcd(w, h);
  cout << (h / g) * (w / g) * c << endl;
}
