#include <bits/stdc++.h>
using namespace std;
long long int sqrt(long long int num) {
  long long int low = 1;
  long long int high = num;
  long long int mid, answer = 1;
  while (low <= high) {
    mid = (low + high) / 2;
    if (mid * mid <= num) {
      answer = mid;
      low = mid + 1;
    } else {
      high = mid - 1;
    }
  }
  return answer;
}
int main() {
  long long int a, b, c;
  cin >> a >> b >> c;
  long long int d, e, f;
  d = sqrt((a * b) / c);
  e = sqrt((b * c) / a);
  f = sqrt((c * a) / b);
  cout << (d * 4) + (e * 4) + (f * 4);
}
