
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system

A fishing boat fishes in the territorial waters of a foreign country without permission. Each time the net is cast, it causes an equivalent-valued loss in the country's fish resources. The probability that the boat will be detained by the foreign coast guard during any net casting is $1/k$, where $k$ is a natural number specific to the country. Assume that the events of being detained or not during each net casting are independent of previous fishing activities. If the boat is detained by the coast guard, all previously caught fish are confiscated, and future fishing in those waters is prohibited. The captain plans to leave the foreign territorial waters after casting the net $n$ times. 

Given that there is always a possibility of being detained by the foreign coast guard, making the fishing profit a random variable, determine the value of $n$ that maximizes the expected value of the fishing profit.

Present the answer in LaTex format: \boxed{Your answer}
user