Minah went shopping with 20 pieces of $5 notes and some $10 notes. The ratio of 5 notes to $10 notes was 2 : 7. After spending an equal number of $5 and $10 notes, the ratio of $5 notes to $10 notes became 3 : 13. What was the total amount spent by Minah?