The solution for the problem #1001
The solution for the problem #1001