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

int main() {
	int W, H, C;
	int mi, ma, ans;

	cin >> W >> H >> C;

	mi = min(W, H);
	ma = max(W, H);

	for (int i = 1; i <= mi; i++) {
		if (ma%i == 0 && mi%i == 0) ans = i;
	}

	ans = (W*H) / (ans*ans);
	
	cout << ans *  C<< endl;

	return 0;
}
