MOSCOW — Prime Minister Dmitri A. Medvedev said on Tuesday that sanctions imposed on Russia over its annexation of the Crimean Peninsula had done “meaningful” harm to the economy, but that it was a price worth paying.

In an annual statement to Parliament, Mr. Medvedev estimated that Russia’s economy had lost $26.8 billion because of low oil prices and sanctions introduced by the European Union and the United States last year. In his speech, Mr. Medvedev said that Russia’s economy had shrunk by 2 percent in the first quarter of 2015.

“The losses from the introduced limitations have been serious for our economy, and we are not going to hide that,” he said during a televised speech to lawmakers.

Mr. Medvedev said that the economy had “stabilized,” although he added that future sanctions could slow Russia’s recovery. Nonetheless, he said that the cost to the economy was justified.