The total number of diagonals of an N-gon is 77, then what is N?

The total number of diagonals of an N-gon is 77, then what is N?