#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x, y, z, a[3];
  cin >> x >> y >> z;
  a[0] = sqrt(x * z / y);
  a[1] = x / a[0];
  a[2] = z / a[0];
  sort(a, a + 3);
  cout << a[0] * 4 + a[1] * 4 + a[2] * 4 << endl;
  return 0;
}
