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.

"""
        Aug 13, 2021
        Written by Zach Leach - at 12:05 AM CST

"""

import sys
getline = sys.stdin.readline

def read_int():
    return int(getline())

def read_ints():
    return list(map(int, getline().split()))

"""
    Parallelepiped

    edge lengths -> math word -> geometry -> draw a picture
    areas -> math word -> geometry -> draw a picture
    faces -> math word -> geometry -> draw a picture
    common -> related values -> pay attention to words around this word to find what values are related
    vertex -> math word -> geometry -> draw a picture
    task -> problem word -> what is being solved
    find -> problem word -> finding what?
    sum -> some values are added together


    this was a math problem. the 2 second time limit combined with the small input made me inclined to solve this
    problem with some crazy factoring simulation thing that was extremely difficult to think about conceptually as well
    as implement.

    i spent more than 5 hours on this problem, and when i first read it i already didn't like it. noticing my bias
    against "math" problems: i went in thinking this was a "really hard" problem and that had an impact on how it felt
    working on it, and made me hesitate from thinking about more "simple" approaches.

    the giveaway here was the word "common". you had 3 values that were RELATED by a "common" vertex. the task was to
    find the edge lengths given the three RELATED values using basic algebra.


    face 1 = a * b
    face 2 = b * c
    face 3 = c * a

    a = face 1 / b
    a = face 3 / c

    a * a = (face 1 * face 3) / (b * c)
    b * c = face 2
    
    a * a = (face 1 * face 3) / (face 2)

    a = sqrt((face 1 * face 3) / face 2)

"""

a, b, c = read_ints()

h = int(((a * c) / b) ** 0.5)
w = int(((a * b) / c) ** 0.5)
l = int(((b * c) / a) ** 0.5)

print(4 * (h + w + l))
