That's a great time to go. SD schools are back in session Aug 22-Aug 26th, so crowds will be moderate to low. With your free days, here are some things we have enjoyed that you might, too.
the Mammoth Site at Hot Springs. It has the largest concentration of Columbian mammoths (the really big ones) in the world, and is a National Natural Landmark. Allow 2-4 hours.
Hill City area: Tour Wind Cave (National Park) and Rushmore Cave (privately owned and pretty). The Circle B Ranch Chuckwagon and cowboy music show is a fun way to spend the evening. Good show, and they offer trail rides, too.
Rapid City: I'm a fan of the Journey Museum (regional history/archaeology), and the small but very interesting Geology Museum on the campus of SD School of Mines and Technology (free -- includes a marine dino skeleton found a few miles from my farm).
At Custer State Park, hike the trail up to Harney Peak, then have a picnic at Sylvan Lake.
Drive up Spearfish Canyon Scenic Byway en route to Devil's Tower. In Deadwood, tour the Adams house for stories about the Black Hills gold rush. The Adams Museum is a good place to spend an hour or two as well. Kevin Costner's Tatanka sculptures are impressive. In nearby Lead you'll find a mining museum and the big Homestake Mine.
Badlands National Park is a beauty. It has a nice visitor center, and the rangers will tell you where you can find buffalo and bighorns. They have some nice trails, too. Driving and stopping to take in the vistas takes 1-2 hours. A few miles away is the Minuteman Missile National Historic Site. The rangers here make this come alive.