Solution 2 - Math Berkeley