Solve second task from Kata-2