Under the Sri Lankan Constitution, if both president and prime minister resign, the Speaker of Parliament will serve as acting president for a maximum of 30 days. Meanwhile, parliament will elect a new president within 30 days from one of its members, who will hold the office for the remaining two years of the current term.