We associate to a good cell decomposition of a manifold M a quadratic algebra and show that the Koszulity of the algebra implies a restriction on the Euler characteristic of M. For a two-dimensional manifold M the algebra is Koszul if and only if the Euler characteristic of M is two. (C) 2009 Elsevier Inc. All rights reserved.