codility-lession-1 in C