- solving problem1