#include "bits/stdc++.h"
#define rep(i,a,n) for(int (i) = (a);(i) < (n);(i)++)

typedef long long ll;
using namespace std;

ll gcd(ll a,ll b){
    if(b == 0) return a;
    return gcd(b,a%b);
}

int main(){
    ll a,b,c,memo = 0;
    cin >> a >> b >> c;
    memo = gcd(a,b);
    
    cout << (a/memo)*(b/memo)*c << endl;
}
