# How to prove that the surface of genus $2$ can be represented as an octagon

I've been trying to show that the surface of genus $2$ can be represented by appropriately identifying the edges of a regular octagon. I think I have managed to work out the way to identify the edges but how can I prove that it is indeed of genus $2$? At the moment I can't think of anything except considering all possible combinations of three cuts, can someone give a hint as to a better method?

There is a generalization of Euler's $v-e+f=2$ which goes $v-e+f=2-2g$ for maps embedded in a surface of genus $g$. So just draw a map on your octagon, and count vertices, edges, and faces carefully.