My street hockey team plays three games each week. My team lost all 12 games in the first four weeks. Then, my team won two games and lost one game in the fifth week, bringing our record to 2 wins and 13 losses. Each week after that, my team won two games and lost one game. My team first wins at least 50% of all its games by the end of the first n weeks. What is n?