#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x, y, z, l, w, h;
  cin >> x >> y >> z;
  long long Min = min(x, min(y, z)), Max = max(x, max(y, z)),
            mid = (x + y + z) - (Max + Min);
  l = sqrt((Max * mid) / Min);
  h = mid / l;
  w = Min / h;
  cout << (l + h + w) * 4 << endl;
  return 0;
}
