NIO purchased a new game, Don't Starve, a sandbox game published by Klei Entertainment Inc. This game revolves around a scientist named Wilson who finds himself in a dark and gloomy world and must survive for as long as possible.
In the very beginning, NIO should help Wilson to gather some food for survival. Assume that when controlling Wilson to walk towards a location on the map, NIO should keep pressing the left button on the mouse, and when Wilson comes to the place where there is food, NIO should stop pressing the mouse, but press the space key on the keyboard to collect the food at this location. The movement of Wilson is controlled by pressing the mouse. As NIO will feel tired of pressing the mouse for a long time and his finger will become very uncomfortable after a long time of pressing, the time he is willing to press the mouse after each collection is strictly decreased. Suppose there are N locations on the 2-D plane, and each point contains an infinite number of food items, but only one can be taken at a time. And NIO will start at the original point.
What is the maximum amount of food can NIO get for Wilson? Note that the food will be refreshed after Wilson left.