def calc_total_crab_fuel_complex(input_positions: list) -> int:
    """
    Determine the fuel required for each crab to move to each position and return the fuel for the minimum consumption
    position

    Args:
        input_positions: list of input crab submarine positions
    Returns:
        total fuel required for all crabs to move to the lowest total fuel position using advanced calculation
    """

    possible_positions = [0] * max(input_positions)
    for pos in range(len(possible_positions)):
        for crab in input_positions:
            dist = abs(crab - pos)
            possible_positions[pos] += int(dist * (dist + 1) / 2)

    return min(possible_positions)