A local gym offers two membership plans. The first plan, Plan A, charges a one-time fee of $50 and a monthly fee of $30. The second plan, Plan B, charges a one-time fee of $20 and a monthly fee of $40. Let $m$ represent the number of months a member stays with the gym. Determine the number of months after which both plans will cost the same amount.