Stumper of the Week #5

Seagulls were on the beach when a boat horn scared them. Half the number flew away but one returned. Another blast made half the number fly away, but one returned. If the number of seagulls at the end is equal to the beginning number, how many seagulls were there?