Solving for total number of pet portraits