Solution based on logarithmics -- started, not finished
backup work in progress