problem 007 (brute force)