There are X trees in a garden. No three of them are collinear. You have many cords colored yellow, red or blue and you will connect every tree pair with a cord. Cords connecting three trees form triangles and you will receive a penalty point for each triangle that consists of three cords of the same color.
What is the maximum value of X that allows you to place the cords without receiving any penalty points.