The United States Armed Forces are the military forces of the United States of America. It consists of the Army, Marine Corps, Navy, Air Force, Space Force and Coast Guard. The president of the United States is the commander-in-chief of the Armed Forces and forms military policy with the Department of Defense (DoD) and Department of Homeland Security (DHS), both federal executive departments, acting as the principal organs by which military policy is carried out. All six armed services are among the eight uniformed services of the United States. From the time of its inception, the U.S. Armed Forces played a decisive role in the history of the United States. A sense of national unity and identity was forged as a result of victory in the First Barbary War and the Second Barbary War. Even so, the founders of the United States were suspicious of a permanent military force. It played a critical role in the American Civil War, continuing to serve as the armed forces of the United States, although a number of its officers resigned to join the military of the Confederate States. The National Security Act of 1947, adopted following World War II and during the Cold War's onset, created the modern U.S. military framework. The Act established the National Military Establishment, headed by the secretary of defense; and created the Department of the Air Force and the National Security Council. It was amended in 1949, renaming the National Military Establishment the Department of Defense, and merged the cabinet-level Department of the Army, Department of the Navy, and Department of the Air Force, into the Department of Defense. The U.S. Armed Forces are one of the largest militaries in terms of the number of personnel. It draws its personnel from a large pool of paid volunteers. Although conscription has been used in the past in various times of both war and peace, it has not been used since 1973, but the Selective Service System retains the power to conscript males, and requires that all male citizens and residents residing in the U.S. between the ages of 18–25 register with the service. On February 22, 2019, however, a federal district court ruled that registering only males for Selective Service is unconstitutional; the case is now pending appeal. Per Credit Suisse, the U.S. Armed Forces are the world's most powerful military. As of 2019, the U.S. military receives US$693 billion in order to fund its mandatory and discretionary accounts. As of 2018, the U.S. military accounts for roughly 36 percent of the world's defense expenditures. The U.S. Armed Forces has significant capabilities in both defense and power projection due to its large budget, resulting in advanced and powerful technologies which enables a widespread deployment of the force around the world, including around 800 military bases outside the United States. The U.S. Air Force is the world's largest air force, the U.S. Navy is the world's largest navy by tonnage, and the U.S. Navy and the U.S. Marine Corps combined are the world's second largest air arm. In terms of size, the U.S. Coast Guard is the world's 12th largest naval force. The U.S. as of FY2019 has about 14,061 aircraft in its military inventory.