Solve the math problem: Kelly, Brittany, and Buffy went swimming at Salt Rock Lake and held a contest to see who could hold their breath underwater for the longest amount of time.  Kelly held her breath underwater for 3 minutes.  Brittany held her breath underwater for 20 seconds less time than than Kelly did, and Buffy held her breath underwater for 40 seconds less time than Brittany did.  How long, in seconds, did Buffy hold her breath underwater?