By Generalized Pigeonhole Principle,
If $k$ is a positive integer and $\text{N}$ objects are placed into $k$ boxes, then at least one of the boxes will contain $\left \lceil \frac{\text{N}}{k} \right \rceil$ or more objects.
Here, we need to find $\text{N,}$ and $k=366,$ and $\left \lceil \frac{\text{N}}{k} \right \rceil = 6$
Least value of $\text{N}$ that will satisfy this is $1831.$