Mia had some pens. She gave 1/3 of her pens plus 1 to her brother. Then, she gave 1/3 of the remaining pens plus 4 to her sister. Finally, she gave 1/2 of what remained plus 3 pens to her bestfriend. She found out the she has 4 pens left. How many pens did Mia have at first?