Jayant bought a certain number of white shirts at the rate of Rs $1000$ per piece and a certain number of blue shirts at the rate of Rs $1125$ per piece. For each shirt, he then set a fixed market price which was $25 \%$ higher than the average cost of all the shirts. He sold all the shirts at a discount of $10 \%$ and made a total profit of Rs $51000$. If he bought both colors of shirts, then the maximum possible total number of shirts that he could have bought is