#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ii = pair<int, int>;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  ios::sync_with_stdio(0);
  ll a1, a2, a3;
  cin >> a1 >> a2 >> a3;
  ll a, b, c;
  b = sqrt(a3 * a1 / a2);
  a = a1 / b;
  c = a2 * b / a1;
  cout << 4 * a + 4 * b + 4 * c << endl;
  return 0;
}
