The Battle of Ulm on 16–19 October 1805 was a series of skirmishes, at the end of the Ulm Campaign, which allowed Napoleon I to trap an entire Austrian army under the command of Karl Freiherr Mack von Leiberich with minimal losses and to force its surrender near Ulm in the Electorate of Bavaria. Background In 1805, the United Kingdom, the Austrian Empire, Sweden, and the Russian Empire formed the Third Coalition to overthrow the French Empire. When Bavaria sided with Napoleon, the Austrians, 72,000 strong under Mack, prematurely invaded while the Russians were still marching through Poland. The Austrians expected the main battles of the war to take place in northern Italy, not Germany, and intended only to protect the Alps from French forces. A popular but apocryphal legend has it that the Austrians used the Gregorian calendar, the Russians were still using the Julian calendar. This meant that their dates did not correspond, and the Austrians were brought into conflict with the French before the Russians could come into line. This simple but improbable explanation for the Russian army being far behind the Austrian is dismissed by scholar Frederick Kagan as "a bizarre myth". Napoleon had 177,000 troops of the Grande Armée at Boulogne, ready to invade England. They marched south on 27 August and by 24 September were ready to cross the Rhine from Mannheim to Strasbourg. After crossing the Rhine, the greater part of the French army made a gigantic right wheel so that its corps reached the Danube simultaneously, facing south. On 7 October, Mack learned that Napoleon planned to cross the Danube and march around his right flank so as to cut him off from the Russians who were marching via Vienna. He accordingly changed front, placing his left at Ulm and his right at Rain, but the French went on and crossed the Danube at Neuburg, Donauwörth, and Ingolstadt. Unable to stop the French avalanche, Michael von Kienmayer's Austrian corps abandoned its positions along the river and fled to Munich. On 8 October, Franz Auffenberg's division was cut to pieces by Joachim Murat's Cavalry Corps and Jean Lannes' V Corps at the Battle of Wertingen. The following day, Mack attempted to cross the Danube and move north. He was defeated in the Battle of Günzburg by Jean-Pierre Firmin Malher's division of Michel Ney's VI Corps which was still operating on the north bank.