Exam task for Yandex Shri. 2013