#include <cstdio>
using namespace std;

int w, h, c;

void swap(int &a, int &b) {
	int tmp = a;
	a = b;
	b = tmp;
}
int gcd(int a, int b) {
	if (a == 0) return b;
	if (a < b) {
		swap(a, b);
	}
	return gcd(a%b, b);
}

int main(){
	scanf("%d%d%d", &w, &h, &c);
	int g = gcd(h, w);
	printf("%d\n", w*h / g / g*c);

	return 0;
}