Question 168
In the chess tournament organized in a school consisting of $2017$ students every two students played at most one match among themselves. At the end of the tournament it turned out that if two students played a match then at least one of them played at most $22$ matches in total. What is the maximal possible number of matches in the tournament?