$$John$$ had $$180$$ more cookies than $$Peter$$. After $$John$$ sold~$\tfrac{4}{5}$~of her cookies and $$Peter$$ sold~$\tfrac{3}{10}$~of her cookies, $$John$$ had~$\tfrac{1}{2}$~as many cookies as $$Peter$$ left. How many cookies did $$John$$ have at first? 
Overseas Competition->Knowledge Point->Combinatorics->Patterns of Figures->Change of Quantity