The number triangle whose vertices are at the vertices of an octagon,but none of the whose sides happen to come from the sides of the octagon.

what i have tried is,

Number of ways to choose three vertices from octagon is 8C3, and drawing triangle with any of this combination is possible since no three vertices fall on same line.

To avoid having the octagon edge, we must avoid choosing adjacent vertices. this is equivalent to choosing an edge , or choosing two adjacent edges from octagon to draw triangle.

Number of ways to choose a single edge is 8 and number of ways to choose two adjacent edges is 7(i.e this by drawing octagon and manually checking. I am not sure how to arrive at this by formula).

So the answer would be 56 - 7 - 8

I am totally confused , when doing that edge condition.

But i am no where near the answer.

The book says 16 triangles are possible.

Can anyone help me.