Assume that a function f ∈ C[−1, 1] changes its convexity at a finite collection Y := {y1, ... ys} of s points yi ∈ (−1, 1). For each n > N(Y), we construct an algebraic polynomial Pn of degree ≤ n that is coconvex with f, i.e., it changes its convexity at the same points yi as f and $$\left| {f\left( x \right) - P_n \left( x \right)} \right| \leqslant c{\omega }_{2} \left( {f,\frac{{\sqrt {1 - x^2 } }}{n}} \right), x \in \left[ { - 1,1} \right],$$ where c is an absolute constant, ω2(f, t) is the second modulus of smoothness of f, and if s = 1, then N(Y) = 1. We also give some counterexamples showing that this estimate cannot be extended to the case of higher smoothness.