http://codeforces.com/problemset/problem/224/A
#include <stdio.h>
#include <math.h>
using namespace std;
int main()
{
int a,b,c;
while(~scanf("%d%d%d",&a,&b,&c))
{
int x=sqrt((double)a/c*b);
int y=a/x;
int z=c/y;
printf("%d\n",4*(x+y+z));
}
return 0;
}