Starting to solve Problem 5
Solution for Problem 5