Clayton plans to attend the Webster County Fair and is trying to decide what would be a better deal. He can pay $39 for unlimited rides, or he can pay $18 for admission plus $3 per ride. If Clayton goes on a certain number of rides, the two options wind up costing him the same amount. What is that cost? How many rides is that?