Accepting the "fait accompli" of the Soviet Union's dissolution, Gorbachev reached a deal with Yeltsin that called for Gorbachev to formally announce his resignation as Soviet President and Commander-in-Chief on 25 December, before vacating the Kremlin by 29 December. Yakovlev, Chernyaev, and Shevardnadze joined Gorbachev to help him write a resignation speech. Gorbachev then gave his speech in the Kremlin in front of television cameras, allowing for international broadcast. In it, he announced, "I hereby discontinue my activities at the post of President of the Union of Soviet Socialist Republics." He expressed regret for the breakup of the Soviet Union but cited what he saw as the achievements of his administration: political and religious freedom, the end of totalitarianism, the introduction of democracy and a market economy, and an end to the arms race and Cold War. Gorbachev was only the third Soviet leader, after Malenkov and Khrushchev, not to die in office. The following day, 26 December, the Council of the Republics, the upper house of the Supreme Soviet, formally voted the Soviet Union out of existence. The Soviet Union officially ceased to exist at midnight on 31 December 1991; as of that date, all Soviet institutions that had not been taken over by Russia ceased to function.