There is a closed polyline with $n$ edges on the plane. We build a new polyline which edges connect the midpoints of two adjacent edges of the previous polyline. Then we erase previous polyline and start over and over. Also we know that each polyline satisfy that all vertices are different and not all of them are collinear. For which $n$ we can get a polyline that is a сonvex polygon?