#include <bits/stdc++.h>
using namespace std;
int dr[8] = {-1, 0, +1, 0, -1, -1, +1, +1};
int dc[8] = {0, +1, 0, -1, -1, +1, -1, +1};
int kx[8] = {-1, +1, +1, -1, +2, +2, -2, -2};
int ky[8] = {+2, +2, -2, -2, -1, +1, +1, -1};
const int N = 100005;
int main() {
  long long a1, a2, a3;
  cin >> a1 >> a2 >> a3;
  long long a = sqrt((a1 * a2) / a3);
  long long b = sqrt((a2 * a3) / a1);
  long long c = sqrt((a1 * a3) / a2);
  long long ans = (a * 4LL) + (b * 4LL) + (c * 4LL);
  cout << ans << endl;
}
