A community gym charges a $50 fee membership and a $50 monthly fee. Workout gym charges a $170 membership fee and a $40 monthly fee. After how many months will the total amount of money paid to both gyms be the same? What will the amount be?