There were 420 matches in the football tournament, with each team playing one team at a time on its own and others' fields. How many teams participated in the competition?​