#include <iostream>

using namespace std;

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

int main()
{
    int W, H, C, g;
    cin >> W >> H >> C;
    g = gcd(W,H);
    cout << (W/g)*(H/g)*C << endl;
    
}
