Croatia is located in southeastern Europe. Comparatively, the area occupied by Croatia is slightly smaller than the state of West Virginia with a total area of 56,542 sq km (21,831 sq mi). Croatia shares boundaries with Slovenia on the W , Hungary on the N , Serbia and Montenegro on the E , Bosnia and Herzegovina on the S and E , and the Adriatic Sea on the W , and has a total boundary length of 8,020 km (4.983 mi), including 5,835 km (3,626 mi) of coastline. Croatia's capital city, Zagreb, is located in the northern part of the country. Croatia's territory includes 1,185 nearby islands in the Adriatic Sea, of which only 66 are inhabited.