Vasya has $n$ candies of several types, where $n > 145$. It is known that for any group of at least 145 candies, there is a type of candy which appears exactly 10 times. Find the largest possible value of $n$.

Let's think step by step and output the final answer within \boxed{}.
user