2020 magicians are divided into groups of 2 for the Lexington Magic Tournament. After every 5 days, which is the duration of one match, teams are rearranged so no 2 people are ever on the same team. If the longest tournament is $n$ days long, what is the value of $n$?

Let's think step by step and output the final answer within \boxed{}.
user