solution to 1000