CZ Coder Games 2018 Problem 1 | ScratchStats