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