Josh purchased 8 cans of tennis balls. The cans came with 3 balls in each can. How many balls did Josh purchase?