problem 1581