Probability that three people have different birthdays: (364/365) x (363/365), etc.
For n people
P = (364/365) x (363/365) x ... x ([653-n+1]/365)It can be checked that the product of these fractions becomes less than 1/2 when n goes from 22 to 23. We are therefore 22.