Contact angle on heterogeneous surfaces: Weak heterogeneities