Three dispensaries received mosquito nets as follows: one got a fifth of the nets while the second one got a 1/3 of the nets, the third one got half of what REMAINED. If the distributor remained with 1260 mosquito nets, how many mosquito nets were there altogether ?