The ratio of the number of magnets Aspilla and Barry had was 2 : 3. When Aspilla bought 4 more magnets and Barry bought 13 more magnets, the ratio became 1 : 2. Find the number of magnets Barry had in the end.