Genus of an algebraic curve