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

int gcd(int n, int s)
{
	while (n != s)
	{
		if (n > s)
			n -= s;
		else
			s -= n;
	}
	return n;
}

int main()
{
	int W, H, C;
	cin >> W >> H >> C;
	
	int x = gcd(W, H);

	cout << W / x*H / x*C << endl;
	return 0;
}