#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, z;
  cin >> x >> y >> z;
  int t = x * y / z;
  t = (int)sqrt(t);
  x = x / t;
  z = y / t;
  y = t;
  cout << 4 * x + 4 * z + 4 * y << "\n";
  return 0;
}
