Amazon continues to ramp up its free one-day shipping program for Prime — but it’s costing a bundle.

For the fourth quarter, the e-commerce giant expects to take a $1.5 billion cost “penalty” versus the year-earlier period related to building out one-day shipping, CFO Brian Olsavsky told analysts on Amazon’s earnings call Thursday. Most of the expense has been in the U.S.

“We’re still learning on the one-day costs as we go what the long-term cost structure will be,” Olsavsky said. “It’s a drastic change to the whole [shipping] network topology.” For Q2, Amazon’s costs for one-day Prime shipping were slightly higher than the $800 million the company previously expected. Olsavsky didn’t say what the hit from one-day shipping was in the third quarter.

Even with the higher costs — mostly related to transportation — Olsavsky noted that Amazon boosted both revenue and unit shipments in the third quarter and said Prime members have increased their spending with the one-day free shipping program.

Prime one-day shipping “will be a great help to customers in Q4,” he said, adding that third-party sellers have also participated in the program.

Amazon reported $70 billion in sales for the third quarter, up 24% year over year, but missed earnings estimates for Q3. It also forecast fourth-quarter sales that were below analyst expectations. Olsavsky blamed part of that on the fact that India’s Diwali festival occurred entirely in Q4 2018 but began in the third quarter of this year; in addition, he noted, Japan increased its consumption tax (from 8% to 10%) effective Oct. 1.

Olsavsky also called out growth in Amazon’s ad business. The company’s “other” revenue segment, which primarily includes sales of advertising services, was $3.59 billion in the quarter, up 44%. He said the company is focused on making its advertising more relevant for vendors, sellers and third-party advertisers — including expanding its video and over-the-top video inventory for advertisers.