Emily has 6 marbles. Megan gives Emily double the number she has. Emily then gives Megan back half of her new total plus 1. How many marbles does Emily have now?
Please reason step by step, and put your final answer within \boxed{}.
user