solve the seventh problem