We provide a simple algorithm that constructs an exact minimizer for the E-functional [GRAPHICS] Here L-infinity. B V stand for the space of bounded functions and the space of functions with bounded variation on the interval [a, b], respectively. As a corollary we obtain the following formula for the K-functional [GRAPHICS] We also discussed the connection between the results and the Rudin-Osher-Fatemi denoising model.