Complete second problem