A group of friends went out to eat at a restaurant. They decided to split the bill equally, so each person had to pay $3x + 5. However, they realized that they were a few dollars short, so they decided to split the bill in a different way. If they split the bill in a different way, each person would have to pay $3x - 5. How many friends were in the group?