Problems from Baltic Olympiad in Informatics 2017, Warmup