Problem 3

Solution for problem 3