For all these problems I find it easier to just simulate it and plot the results. Do a loop with 100k iterations. In each iteration generate 23 numbers between 1,365 from a uniform distribution. Then check in how many iterations you had duplicate entries.
You will see that asymptomatically you will reach 50k cases