Task 3 by Georgi Dimitrov