This is tricky, it appears like the other pirates know that they can kill him and make more money. So even if he offers one doubloon for himself then he will be killed to get that doubloon.
But if you work backwards starting with two and adding one each time then you can get to the conclusion that the first pirate should give himself all but 2 coins which he'll give to 3 and 5.
If it's just 4 and 5 then 4 will give himself all of it(assuming his vote is better than 5's)
If it's 3, 4 and 5 then 5 will know he will get nothing in the next round and 3 knows this so 3 gives him one coin.
With 4 pirates, 4 would accept a coin because with 3 pirates left he would get nothing and then give the rest no coins.
With all 5 pirates 1 can offer 3 and 5 one coin each and take 998 for himself.