solving problem 445