The first flock contained 5283 birds . The second contained 5 times as many birds the third flock had twice as many birds as the second flock . How many birds were there in all?