6. A bag of peanuts has a total of 1988 peanuts. On the first day, a monkey takes one peanut. Starting from the second day, the number of peanuts taken each day is the sum of all the peanuts taken in previous days. If on a certain day the number of peanuts left in the bag is less than the total number of peanuts already taken, on that day it takes one peanut again and starts a new cycle according to the original rule. If this continues, on which day will the bag of peanuts be completely taken by the monkey?
Let's assume the monkey used $k$ days in the first round, meaning that on the $k+1$-th day, it started again by taking one peanut. Therefore, the total number of peanuts taken in the first $k$ days is
$$
1+1+2+2^{2}+2^{3}+\cdots+2^{k-1}=?^{k-1}
$$

peanuts, and $1988-2^{k-1}<2-1$. Also, $1988-2^{k-1}-2^{k-1}<2^{t-1}, t<k$.
$$
1988=2^{10}+2^{0}+2^{3}+2^{7}+2^{0}+2^{2} \text { . }
$$

Therefore, it took
$$
11+10+9+8+7+3=48 \text { days. }
$$