Total number of people = k
Total pairs that can be formed: $\frac{k(k-1)}{2}$
Probability that a given pair of people have same birthday = $\frac{1}{365}$
Expected number of pairs having same birthday = $\frac{1}{365}*\frac{k(k-1)}{2}$
According to the question
$\frac{1}{365}*\frac{k(k-1)}{2} \ge 1$
after solving k = 27, 28 (after some approximations).
Putting k = 27 in $\frac{1}{365}*\frac{k(k-1)}{2}$ gives a values less than 1 (may be because of approximations or I made some mistake), hence 28 is the answer.
I am sure someone can explain this better than me. Any corrections or modifications are very much welcome.