def first_half(dayinput):
    """
    first half solver:
    length l, width w, and height h
    find the surface area of the box, which is 2*l*w + 2*w*h + 2*h*l plus area of smallest side
    """
    lines = dayinput.split('\n')
    total_sq_feet = 0
    for line in lines:
        dimensions = map(lambda x: int(x), line.split('x'))
        [l, w, h] = sorted(dimensions)
        sq_feet = (2 * l * w) + (2 * w * h) + (2 * h * l) + (l * w)
        total_sq_feet += sq_feet
    return total_sq_feet