Dr. Johnson has a container with pills.
On the first day he takes half of the pills from the container.
On the second day, he takes half of the pills that remain in the container.
On the third day, he noticed that only 2 pills remained in the container.
How many pills were there in the container, to begin with?