I used code from this answer
tex.stackexchange.com/questions/73104/… (because I want that numbering of section be 1, 2, 3 and not 1.1, 1.2, 1.3 (for first chapter, for example)), but now I have problem with spacing (it's too much white space aroun 1, 2, ...). See picture