The president of the Republic of North Macedonia (; ) is the head of state of North Macedonia. The office was first established a few months before the declaration of independence on 8 September 1991. The first president was Kiro Gligorov, the oldest president in the world until his resignation in 1999. Although largely a ceremonial position, with most of the legislative power being vested in the prime minister and the Assembly, the president is the commander-in-chief of the armed forces and the first body for performing foreign affairs. Presidential rights and obligations are determined by the Constitution and laws. The president must be a citizen of North Macedonia, be over 40 years of age and have lived in North Macedonia for at least ten of the previous fifteen years before election. Electoral system The president of North Macedonia is elected using a modified two-round system; a candidate can only be elected in the first round of voting if they receive the equivalent of over 50% of the vote from all registered voters. In the second round, voter turnout must be at least 40% for the result to be deemed valid. The Constitution mandates that the president must be over 40 years of age and have lived in the country for ten of the last fifteen years before election day. Before 2009, the constitution required a 50% turnout in the second round. The XXXI amendment to the constitution, voted on 9 January 2009 by all 86 present deputies, lowered it to the current 40%, as the government feared the tendency of ever lower election turnout would make presidential elections frequently invalidated. In the 2009 Macedonian presidential election that followed, the turnout in the second round ended up being 42.6%. History During the period of the Socialist Republic of Macedonia, there was a collective presidency which was abolished in 1991. Its first president was Metodija Andonov Čento, elected at the first plenary session of ASNOM, when the modern state was formed, while the last one was Vladimir Mitkov. Following the transition from socialist system to parliamentary democracy in 1990, the Socialist Republic of Macedonia changed the collective leadership with a single-president post in 1991, few months before independence. Kiro Gligorov became the first president of the Socialist Republic of Macedonia on 27 January 1991. On 16 April 1991 the parliament adopted a constitutional amendment removing the term "Socialist" from the official