CMIMC 2020 Combinatorics and Computer Science Problem 4

The continent of Trianglandia is an equilateral triangle of side length 9, divided into 81 triangular countries of side length 1. Each country has the resources to choose at most 1 of its 3 sides and build a “wall” covering that entire side. However, since all the countries are at war, no two countries are willing to have their walls touch, even at a corner. What is the maximum number of walls that can be built in Trianglandia?