Prasad went to a shop to purchase parrots, pigeons, doves and sparrows. The cost of each parrot was Rs. 1 more than that of each sparrow and Rs,3 less than that of each pigeon, He spent the same amount on purchasing doves, pigeons and sparrows and twice that amount on purchasing parrots. The number of doves he purchased was 15 less than that of the parrots he purchased, The number of sparrows he purchased was 20 more than that of the, pigeons he purchased, The number of parrots he purchased was the sum of the numbers of pigeons and sparrows he purchased. Find the total number of birds he purchased.