Sum the numbers of triangle and ouput