A.Y. Evnin

2000 people registered on a new website. Each of them invited 1000 people to be their friends. Two people are considered friends if and only if each of them invited the other to be a friend. What is the minimum number of pairs of friends that could have formed?