#include <iostream>
#include <algorithm>
#include <iomanip>
#include <math.h>
using namespace std;
int gcd(int x,int y){
  int r;
  if( x<y ) swap(x,y);
  while(y>0){
    r=x%y;
    x=y;
    y=r;
  }
  return x;
}
int main(){
  cin.tie(NULL);
  ios::sync_with_stdio(false);
  int w,h,c;
  cin>>w>>h>>c;
  cout<<(w/gcd(w,h))*(h/gcd(w,h))*c<<"\n";;


  return 0;
}




