Problem 1. Now prints the result.