Timofeev Kirill, 2536

Deadline was ages ago, but I still hope to have half of points, because work is done.