$\begingroup$

I work at a guffin factory. I manufacture guffins and have an unlimited access to guffin storage. I can fit up to 20 guffins in my bag, get them home from the factory and nobody will chase me.

You see, the factory wants to encourage brave and risky workers. When you are hired, they give you a random (evenly distributed) secret number N from 1 to 20 inclusively. If you ever steal N (or more) guffins a single day, the next day they will proclaim you fired. So, if I steal 20 I would be fired for sure. But even if I get only one, I can be fired if my luck is too low. The factory has a secure invisible x-ray machine, so they will see you stealing anyways.

Today (not a working day), my boss left me a message.

You' re a total wuss, Thomas. You spend five years working for us, and haven't stolen even one guffin. I'm sick of you and want to fire you. However, I had to warn you. The next 20 work-days (two weeks) are your last days at the factory (however, they can end earlier if you act correspondingly).

My plan is to steal 20 guffins once I get to the factory, and leave. A guffin market value now is quite high, so my family won't starve until I find a new job. However, I can see a nice puzzle here.

Having my information (no info on my secret number, and 20 days to quit the job), what is the best (mean) amount of guffins I can steal off my factory? What is the best strategy here?