Sales by Match | HackerRank

How many pairs of socks can Alex sell?