Description of the simple algorithm in the task b