At a supermarket, pineapple juice sells at $1 per pint (16 ounces). Greg wants to buy eighteen 40-ounce cans of pineapple juice from the supermarket. How much does he have to pay altogether?