It was a dark and stormy night, when suddenly you saw a flash of lightning. Three-and-a-half seconds later you heard the thunder. Given that the speed of sound in air is about 340 m/s, how far away was the lightning bolt?