Juan and Malia make money by walking neighborhood pets. During a conversation about their work, they realize that they are both walking the same total number of pets, even though Juan walks pets in groups of 9 and Malia walks pets in groups of 3. What is the smallest total number of pets each could be walking?​