# Problem Description
The problem involves calculating the maximum number of 2x2 blue squares that can fit inside a right triangle with side length L. The goal is to find a mathematical relationship between the input length L and the maximum number of blue squares that can be placed without overlapping and within the triangle's boundaries. The squares must be aligned to a grid and cannot be rotated.

# Visual Facts
1. Each case shows a right triangle with increasing side lengths:
   - Case 1: L=3, pink squares only
   - Case 2: L=4, 1 blue square
   - Case 3: L=5, 1 blue square + 2 pink squares
   - Case 4: L=6, 3 blue squares
   - Case 5: L=7, 3 blue squares + 3 pink squares
   - Case 6: L=8, 6 blue squares

2. Each square (both blue and pink) has a side length of 2 units
3. Pink squares represent spaces that cannot fit a complete blue square
4. All squares are aligned with the triangle's base and height

# Visual Patterns
1. Pattern of blue square counts:
   - L=4: 1 blue square
   - L=6: 3 blue squares (1+2)
   - L=8: 6 blue squares (1+2+3)

2. Mathematical patterns:
   - The formula appears to be sum of first (n-1) natural numbers when L=2n
   - For L=2n, number of squares = 1+2+3+...+(n-1) = n*(n-1)/2
   - For odd values of L, the number of squares remains the same as L-1

3. Constraints:
   - Minimum L for any blue square is 4 (2n where n=2)
   - For L < 4, no blue squares can fit
   - Only even numbers of L (L=2n) achieve optimal packing
   - Squares must be placed in a stair-step pattern for maximum efficiency

# Solution
def solution(L: int) -> int:
    """
    Calculates the maximum number of blue squares that can fit inside a triangle.

    Parameters:
        L (int): The length of each side of the equilateral triangle.

    Returns:
        int: The maximum number of blue squares that can fit inside the triangle.
    """
    n = L // 2
    return n * (n - 1) / 2


# Test Script
def test():
    test_cases = [
        (3, 0),
        (4, 1),
        (5, 1),
        (6, 3),
        (7, 3),
        (8, 6),
        (9, 6),
        (10, 10),
        (11, 10),
        (12, 15)
    ]

    for L, expected_output in test_cases:
        try:
            output = solution(L)
        except Exception as e:
            error_message = (
                f"An exception occurred while running the test case:\n"
                f"`L`: {L}\n\n"
                f"Exception: '{str(e)}'"
            )
            assert False, error_message

        if output != expected_output:
            error_message = (
                f"The following Test Case failed:\n"
                f"`L`: {L}\n\n"
                f"Actual Output: {output}\n"
                f"Expected Output: {expected_output}"
            )
            assert False, error_message

test()