Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
This fact is known as "the classification of surfaces". For a particularly non elementary view see http://www.math.uchicago.edu/~shmuel/tom-readings/ranicki-intro, chapter 4.
EDIT A particular elementary proof is here.