#include <bits/stdc++.h>
using namespace std;
int main() {
  int x1, x2, x3;
  cin >> x1 >> x2 >> x3;
  int a, b, c;
  b = sqrt((x1 * x3) / x2);
  a = x1 / b;
  c = x3 / b;
  cout << 4 * (a + b + c) << endl;
  return 0;
}
