Cody goes to the store and buys $40 worth of stuff. The taxes were 5%. After taxes, he got an $8 discount. Cody and his friend split the final price equally. How much did Cody pay?