A drawer contains a mixture of red socks and blue socks, at most 2014 in total. It so happens that, when two socks are selected randomly without replacement, there is a probability of precisely 2/3 that both are red or both are blue.
What is the maximum possible number of red socks in the drawer that is consistent with this data?