for first half of the day Sammy eat one cookie of the huge bag of cookies....

for second part of the day he eat 4 cookies of that what was left from fist part of the day...

from that point, he every day eat double as much as day before, and finally eat the whole bag for 27 days ....

when did he eat half of cookies from the bag ?

Edit: sorry didn't realize that someone would calculate that