Add solution of problem1