Dobby the house-elf has dropped all his socks on the floor in the middle of the night! He has 30 red socks, 22 gold socks and 14 black socks. How many socks would he have to pick up before getting a matching pair?