3. In the Slytherin faculty at Hogwarts, there are 30 students. Some are friends (friendship is mutual, i.e., if A is friends with B, then B is also friends with A), but there are no 3 people who are pairwise friends with each other. On New Year's, each student sent cards to all their friends. What is the maximum number of cards that could have been sent?
Answer: 450.

Solution: Let's find the person with the most friends. Suppose there are no fewer than 15, and denote their number as $15+a$. We will divide the students into two groups: the first group will consist of these $15+a$ students. According to the condition, they cannot be friends with each other, so each of them has no more than 15-a friends. The second group will consist of the remaining 15-a, each of whom has no more than $15+a$ friends. Thus, each group will send no more than 225- $a^{2}$ cards. Therefore, in total, no more than 450-2 $a^{2}$ cards will be sent, which does not exceed 450.

Note that this value is achievable. Divide the students into two groups of 15 people each, and let each representative of one group be friends with all representatives of the other group.