problem 1005