Talk about “Thank you for your service.”

These two dozen sailors, Marines and Coast Guardsmen gave up two days of their shore leave time last week during Fleet Week to help rebuild a house in South Richmond Hill.

“I try to do something like this in every port I go to,” said Danielle Read, a hull maintenance technician on the destroyer USS Jason Dunham.

Vans picked up the volunteers from the Dunham dockside on Manhattan’s West Side, the day after they docked here.

They were brought to 132nd Street where Habitat for Humanity is building a new home from the ground up for a family of five. The house had been abandoned for years and was a total knockdown for the 43-year-old organization.

The Fleet Week program is in its seventh year and the Habitat staff is always happy to see them.

“These are some of the hardest-working, most proficient volunteers we have,” said Matt Dunbar, vice president of external affairs for Habitat. “We tend to be ahead of schedule when they leave.”

John McFarland, a fire control officer on the Dunham, said he had a free day before his wife came up to join him and “this sounded like fun.”

The 32nd Street construction is one of 20 vacant properties in Queens deeded by the city to Habitat for rehabilitation and sale to new owners, most of whom have never owned a house before.