Solution:
Denote by X1,X2,…,Xn the cities in the country and let Xi be connected to exactly mi other cities by direct two-way airline. Then Xi is a final destination of mi direct routes and an intermediate stop of mi(mi−1) non-direct routes. Thus r=m12+…+mn2. As each mi is at most n−1 and 13⋅122<2014, we deduce n≥14.
Consider n=14. As each route appears in two opposite directions, r is even, so r≥2016. We can achieve r=2016 by arranging the 14 cities uniformly on a circle and connect (by direct two-way airlines) all of them, except the diametrically opposite pairs. This way, there are exactly 14⋅122=2016 routes.