NASA initiated the Gemini program in 1961 to learn about the effects of long-duration space travel, performing spacewalks, and spacecraft docking. The Gemini capsule was larger and more advanced than the previous Mercury spacecraft. It used ejection seats instead of an escape tower and had improved maneuverability. The rockets used in Project Mercury were replaced with the Titan II rocket. The first unmanned test flight, Gemini 1, was launched in April 1964 to test the capsule and the modified launch vehicle. After a successful flight, the Titan II rocket was considered safe for human spaceflight. The second unmanned launch, Gemini 2, confirmed the capsule's safety. The first manned Gemini flight, Gemini 3, took place on March 23, 1965, with astronauts Gus Grissom and John Young. They tested the spacecraft's maneuverability and completed three orbits. The mission was a success, although the astronauts got in trouble for smuggling and eating a sandwich in space. The Soviet Union achieved significant milestones before the United States, including sending the first woman, Valentina Tereshkova, into space and setting endurance records with solo flights. Russian cosmonaut Alexei Leonov became the first person to perform a spacewalk, but he faced difficulties getting back inside the spacecraft. American astronaut Ed White also performed a spacewalk during the Gemini 4 mission. Gemini 7 set an endurance record of almost 14 days in space, proving humans could survive for extended periods. Gemini 8 was the first U.S. spacecraft to suffer a critical in-space system failure but still completed the docking procedure. The original crew for Gemini 9 tragically died in a plane crash, but the mission continued with a backup crew. Gemini 11 flew higher than any previous NASA mission, and Gemini 12 set a record for the longest spacewalk. In total, 12 missions were completed as part of Project Gemini, setting the stage for the Apollo program. The cost of Project Gemini was 1.3 billion dollars, equivalent to over 10 billion dollars today. With the successful completion of Project Gemini, NASA was ready to fulfill its ultimate goal of sending humans to the moon as part of the Apollo program.