Count the number of edges (#486) - Azerbaijan Computing Olympiad