Problem2 Solution