Former President Barack Obama's top military adviser said Friday that President Trump needs to be ready to outlast North Korean officials when he opens talks with Kim Jong Un in May about its nuclear ambitions.

Martin Dempsey, chairman of the Joint Chiefs of Staff under Obama, said on Fox News that North Korea is famous for dragging out international talks.

"We're going to have to have some stamina," he said. "This is the same country that negotiated the shape of the table in the 1950s for months before they sat down. So it's going to take some stamina."

That was an apparent reference to North Korea's complaint during the late 1960s, when North Korea pressed for the Paris Peace Accords negotiations to end the war in Vietnam to take place at a round table, instead of a rectangular table that others wanted.

Dempsey admitted that South Korea's announcement that Trump and Kim would meet in May was a "surprising outcome," but said he supported the effort to negotiate.

"I think it's a very positive outcome to the pressure that's been placed economically and diplomatically," he said. "Any diplomatic outreach is certainly a better alternative than a conflict."

He said Trump should realize the regional implications of the effort.

"I think when the president goes into this engagement, he ought to recognize, and he will, that there are other stakeholders, notably our allies in the region," Dempsey said. "So this shouldn't be just about the United States and North Korea."