The president of the Slovak Republic (Slovak: Prezident Slovenskej republiky) serves as the head of state of Slovakia and commander-in-chief of the Armed Forces. The people directly elect the president for five years, for a maximum of two consecutive terms. The presidency is essentially a ceremonial office, but the president exercises certain limited powers with absolute discretion. Their official residence is the Grassalkovich Palace in Bratislava.