Add solution to 5th problem