Task: Question Answering
Input (English): Passage: On July 24, 1580, António proclaimed himself as King of Portugal and of the Algarves, in Santarém, which was followed by popular acclamation in several locations of the country. However, he governed in Continental Portugal for only 33 days, culminating in his defeat at the Battle of Alcântara by the Spanish armies led by Fernando Álvarez de Toledo, Duke of Alba on August 25. The Battle ended in a decisive victory for the Spanish Habsburgs, both on land and sea. Two days later, the Duke of Alba captured Lisbon. In early 1581, António fled to France and, as Philip's armies had not yet occupied the Azores, he sailed there with a number of French adventurers under Filippo Strozzi, a Florentine exile in the service of France, but was utterly defeated at sea by a combined Spanish-Portuguese navy commanded by Don Álvaro de Bazán, 1st Marquis of Santa Cruz at the Battle of Ponta Delgada off Terceira Island on July 26, 1582 and off São Miguel Island on July 27, 1582. António still accompanied an English Expedition, under the command of Sir Francis Drake and Sir John Norreys, to the coasts of Spain and Portugal but the Expedition failed and António's attempt to rule Portugal from Terceira Island, in the Azores  came to an end in 1583. 
Question: How many years elapsed between Antonio proclaiming himself the King of Portugal, and his attempt to rule Portugal coming to an end? 
Answer type: Number 
Output (English): 3.