
Susan wants to build a house of cards so big that the whole country would be buried in cards if it toppled over.
The house has a triangular shape. The photo above shows a house of height 6.
A house of height h is built from h rows. Counting from the top, row i consists of i pairs of cards leaning against each other, so it uses 2i cards. Between row i and row i+1 lie i flat cards. The total number of cards in a house of height h is therefore
2h(3h+1)

The figure above shows the structure of a house of height 5, which uses 40 cards.
For the house to look right, the four suits (clubs, diamonds, hearts, spades) must appear equally often. Depending on the height, that is sometimes possible and sometimes not. Given a lower bound h0 on the height, find the smallest height h≥h0 for which such a house can be built.