#include<iostream>
#include<algorithm>
using namespace std;

int gcd(int a,int b){
    if(b==0)return a;
    return gcd(b,a%b);
}
int main(){
    int w,h,c;
    cin>>w>>h>>c;
    if(w<h)swap(w,h);
    cout<<w*h/gcd(w,h)/gcd(w,h)*c<<endl;
    
    return 0;
}
