first problem - brute force