problem 847