#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, z;
  scanf("%d %d %d", &x, &y, &z);
  int b = sqrt(x * z / y);
  int a = x / b;
  int c = y / a;
  int sum = 4 * a + 4 * b + 4 * c;
  printf("%d\n", sum);
  return 0;
}
