Counting socks

Can you work out the smallest number of socks Rachel needs to take out of the box to be guaranteed a pair?

Problem



A box contains two white socks, three blue socks and four grey socks.

Rachel knows that three of the socks have holes in them, but does not know what colour these socks are.

She takes one sock at a time from the box without looking.

How many socks must she take for her to be certain she has a pair of socks of the same colour without holes?

This problem is taken from the UKMT Mathematical Challenges.