#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  int A, B, C;
  cin >> A >> B >> C;
  for (int i = 1; i <= A; ++i) {
    if (A % i == 0) {
      int a = i;
      int b = A / i;
      if (B % b != 0) continue;
      int c = B / b;
      if (a * b != A || b * c != B || a * c != C) continue;
      cout << 4 * a + 4 * b + 4 * c << endl;
      break;
    }
  }
  return EXIT_SUCCESS;
}
