#include <bits/stdc++.h>
int main() {
  int a, b, c;
  scanf("%d %d %d", &a, &b, &c);
  int x, y, z;
  z = (int)sqrt((a * b) / c);
  y = (int)sqrt((b * c) / a);
  x = (int)sqrt((c * a) / b);
  int res = 4 * (x + y + z);
  printf("%d", res);
}
