Task from Tln math competition