The numbers of boys and girls in a class was in the ratio 2:5. After 5 girls were transferred to another class, half of the remaining students were boys. How many more girls than boys were there in the class at first?