Task: Question Answering
Input (English): Passage: Quarrels between Denmark and Sweden led to the Northern Seven Years' War in 1563, which ended in 1570 with the Treaty of Stettin. Primarily fought in western and southern Scandinavia, the war involved important naval battles fought in the Baltic. When Danish-held Varberg surrendered to Swedish forces in 1565, 150 Danish mercenaries escaped the subsequent massacre of the garrison by defecting to Sweden. Among them was Pontus de la Gardie, who thereafter became an important Swedish commander in the Livonian War. Livonia was also affected by the naval campaign of Danish admiral Peter or Per Munck, who bombarded Swedish Reval from sea in July 1569. The Treaty of Stettin made Denmark the supreme and dominating power in Northern Europe, yet failed to restore the Kalmar Union. Unfavourable conditions for Sweden led to a series of conflicts that only ended with the Great Northern War in 1720. Sweden agreed to turn over her possessions in Livonia in return for a payment by Holy Roman Emperor Maximilian II. Maximilian failed to pay the promised compensation, however, and thereby lost his influence on Baltic affairs. The terms of the treaty regarding Livonia were ignored, and thus the Livonian War continued. From Ivan's point of view, the treaty enabled the powers involved to form an alliance against him, now that they were no longer fighting each other. 
Question: How many years after Varberg surrendered did the war end? 
Answer type: Number 
Output (English): 5.