A drawer in a darkened room contains 100 red socks, 80 green socks, 60 blue socks and 40 black socks. A boy selects socks one at a time from the drawer but is unable to see the color of the socks drawn.

What is the smallest number of socks that must be selected to guarantee that the selection contains at least 10 matching pairs? ( No sock may be counted in more than one pair.)