President Richard Nixon did it in less than three years. President George H.W. Bush completed it in one term. President Barack Obama has now matched their feat by visiting South Dakota, his 50th state, on Friday.

It took him nearly 6 1/2 years.

"I am thrilled to be here," Obama said, opening his commencement address for Lake Area Technical Institute and promoting his proposal for free community college. "I have now been to all 50 states as president and I was saving the best for last.

"To the other 49, I hope you take no offense," he added. He's now the fourth president to set foot in every U.S. state.

Lake Area Tech is among the nation's top community colleges, recognized for rigorously preparing students and for a two-year graduation rate that's higher than the national average. Obama said community college education should be available to everyone, just like K-12 education, because the schools play such an important role in preparing students for the high-skilled, technical jobs of the future.

"As a country we can't afford to let any striving American be priced out of the education they need to get ahead," he said.

In just two years, community colleges like Lake Area Tech can change lives, change careers and benefit their communities, Obama said. The graduates inspired him, he said.

"That's why I came here today, to this little tiny school in a little tiny town," he said.

Obama had traveled to 46 states by the start of the year, leaving four reliably Republican states on the to-visit list.

Trips to Idaho and South Carolina -- two of those remaining -- were quickly arranged, followed by Utah.

Obama had been to South Dakota before Friday's stop, but that came in 2008 when he was campaigning for president. Last year, he spoke in North Dakota at the Standing Rock Indian Reservation that straddles South Dakota.