The sides of a square-shaped room are 3 meters long. Wendy wants to buy carpet to cover the floor of the room. If the carpet costs $30.71 per square meter, how much will it cost to buy enough carpet for the room?