You've got a rectangular parallelepiped with integer edge lengths. You know the areas of its three faces that have a common vertex. Your task is to find the sum of lengths of all 12 edges of this parallelepiped.
The first and the single line contains three space-separated integers — the areas of the parallelepiped's faces. The area's values are positive ( &gt; 0) and do not exceed 10<sup class="upper-index">4</sup>. It is guaranteed that there exists at least one parallelepiped that satisfies the problem statement.
from math import sqrt, ceil

a1, a2, a3 = input().split()
a1 = int(a1)
a2 = int(a2)
a3 = int(a3)

maiores = []
menores = []

#print(sqrt(a1), sqrt(a2), sqrt(a3))
#print(ceil(sqrt(a1)), ceil(sqrt(a2)), ceil(sqrt(a3)))

if ceil(sqrt(a1)) - sqrt(a1) > 0.0:
    maiores.append(ceil(sqrt(a1)))
    menores.append(ceil(sqrt(a1)) - 1)
else:
    maiores.append(sqrt(a1))
    menores.append(sqrt(a1))

if ceil(sqrt(a2)) - sqrt(a2) > 0.0:
    maiores.append(ceil(sqrt(a2)))
    menores.append(ceil(sqrt(a2)) - 1)
else:
    maiores.append(sqrt(a2))
    menores.append(sqrt(a2))

if ceil(sqrt(a3)) - sqrt(a3) > 0.0:
    maiores.append(ceil(sqrt(a3)))
    menores.append(ceil(sqrt(a3)) - 1)

else:
    maiores.append(sqrt(a3))
    menores.append(sqrt(a3))

#print(maiores)
#print(menores)

soma = 0
soma = maiores[0] + maiores[1] + maiores[2] + menores[0] + menores[1] + menores[2]

print(f'{soma*2:.0f}')

  		 		   	    	 			 	 	 				