Andy, Boris and Charles had a total of 2475 stamps. At first, Andy gave 1/2 of his stamps to Boris. Boris then gave 2/3 of his stamps to Charles. Finally, Charles gave 1/6 of him stamps to Andy. In the end, the ratio of the number of Andy's stamps to the number of Boris' stamps became 3:2. Charles had twice the total number of stamps that Andy and Boris had. How many stamps did each of them have at first?