Problem 3
Added the question