DENVER (KDVR) — Denver is a city full of dog and cat lovers and some may think the more furry friends there are in the Mile High City, the better.

There is a limit, however, to how many dogs and cats you can have in your house at a time.

You can have up to three dogs and up to five cats in Denver, but there’s a catch.

Essentially, it works like an elementary school math problem: You can have up to five dogs and cats combined, but no more than three of the five can be dogs.

So, if you have four cats, you can have one dog. If you have three dogs, you can have two cats. But you cannot have four dogs and one cat, or five cats and two dogs.

These limits come from the Denver Zoning Code, and they apply to all zone districts in the city. You can get a permit for more, but other than that, the limits apply.

There are limits to how many of other pets from various species you can have, as well. For example, you can have up to two rabbits and up to 25 pigeons or doves.

There is “no numerical limit” to how many fish, small reptiles or small rodents — such as rats, mice or guinea pigs — you can have, as long as they aren’t being bred for resale.

Other cities in the Denver metro, including Aurora, have similar restrictions on the number of pets you can have in your house.