Can you give me some step-by-step instructions for this math problem: Joseph gave 23 cards to each of his 15 students and had 12 cards left. How many cards did Joseph have at first?