The decision to attack the Soviet Union and the decisive defeat at Stalingrad led to the retreat of the German armies and the eventual loss of the war.[221] The total number of soldiers who served in the Wehrmacht from 1935 to 1945 was around 18.2 million, of whom 5.3 million died.[157]