solve problem1