YouTube CEO Susan Wojcicki. Kimberly White/Getty How much would you have charged if two scrappy computer scientists came asking to rent out your garage to start a company back in 1998?

"$1,700 a month," YouTube CEO Susan Wojcicki said, recalling the rent she charged for the garage at her old home in Menlo Park, California, to the two Google cofounders, Larry Page and Sergey Brin. "And I took security deposit."

At the time, Page and Brin were Ph.D. students at Stanford, probably making much less than what most engineers did in Silicon Valley. But Wojcicki didn't have to think twice when Page and Brin came asking.

"[Rent] is even more expensive now, but it was expensive back then," she said, while on stage at Salesforce's annual conference Dreamforce on Thursday.

Wojcicki no longer lives in that 2,000-square-foot, four-bedroom house, but the decision to rent out her garage to Page and Brin ended up changing her life: She was later hired as Google employee No. 18 and went on to become its senior vice president of advertising and commerce, overseeing some of its largest entities, including AdSense and AdWords.

Another interesting fact: Wojcicki was the first pregnant woman at Google.

Being pregnant made her do some research on maternity leave, and she found some staggering numbers about paid maternity leave in the US.

"I was really surprised to learn that most women in the US don't have paid maternity leave, regardless of the job," she said. "In the private sector, only 12% of women have paid maternity leave, and 25% women go back to work after 10 days."

But after seeing more and more pregnant women at Google, Wojcicki says, she discovered another interesting fact: Having a longer paid maternity leave helped her retain employees.

"You're more ready to return to work when your kids are older, they're sleeping better, they're getting closer to eating real food," she said. "The really sad thing is a lot of women have to go back because they don't want to lose their jobs or they want to have income."

Google now offers 18 weeks of paid maternity leave for mothers and 12 weeks for fathers. But she said most businesses still didn't realize longer paid maternity leaves are good for the company.

"Paid maternity leave is also good for business," she said.