At a festival 2/7 of the number of girls was equal to 3/5 of the number of boys. There were 165 fewer boys than girls, how many children were at the festival in all?