Answer based on context:

Over the centuries, Weimar remained a small town of less than 5,000 inhabitants. When it became the capital of Saxe-Weimar in 1572, population growth was stimulated and population increased from 3,000 in 1650 to 6,000 in 1750. Around the year 1800, Weimar had 7,000 inhabitants. Their number grew constantly over the years to 13,000 in 1850, 28,000 in 1900 and 35,000 at the beginning of World War I. During the interwar period, the new capital of Thuringia saw a population boom, which led to 65,000 inhabitants in 1940. Since that time, the population levels have stagnated. The years 2009 to 2012 brought a moderate growth of approximately 0.35% p. a., whereas the population in bordering rural regions is shrinking with accelerating tendency. Suburbanization played only a small role in Weimar. It occurred after the reunification for a short time in the 1990s, but most of the suburban areas were situated within the administrative city borders.

Between 1750 and 1900, how many residents did Weimar gain?
22000