correct codility_1_3 code