I assume this is simple mathes. There is no point to split the first 1000, because there is always chance that you lose all the money in first round and that's end of everything.
I forget how to exactly write 函数 due to not use it for a period, although I am not old. It probably like this
∑((N*1.2 -2), 100)
100
N0=1000
((((1000*1.2-2)*1.2-2)*1.2-2*1.2-2)....
continues 100 times