The third-smallest country in Central America, Costa Rica has an area of 51,100 sq km (19,730 sq mi), including some small islands. Comparatively, the area occupied by Costa Rica is slightly smaller than the state of West Virginia. Its length is 464 km (288 mi) N – S , and its width is 274 km (170 mi) E – W . Costa Rica is bordered on the N by Nicaragua, on the E by the Caribbean Sea, on the SE by Panama, and on the SW and W by the Pacific Ocean; the total boundary length is 1,929 km (1,199 mi), which includes the coastline of 1,290 km (805 mi). Costa Rica's capital city, San José, is located in the center of the country.