You may be feeling the pain of the high cost of weddings, even if you’re not getting married yourself. Just as happy couples are shelling out more and more to say “I do,” guests are spending more to be part of the fun.

A recent survey by American Express found that the cost of attending a wedding in 2016 averaged around $703 per guest, up from $673 in 2015. But the news is even worse for millennials, who spent an average of $893 per wedding, 27 percent higher than the general population.

Given that the average American will attend three weddings this year, that adds up to a considerable chunk of change.

Why is the cost so high? Although the American Express survey provided no cost breakdown for guests’ expenses, the study did offer data on the average spending by members of wedding parties: $743 per person, including airfare ($205), an outfit ($166), and childcare or pet care costs ($69).

Given that about one-fifth of couples are opting for destination weddings these days, guests are having to spring for their own airfare and accommodations, sometimes in pricey locales.

Then there’s the wedding gift. The study found that Americans expect to spend an average of $127 on gifts when the newlyweds are relatives, or $99 for friends.

So how you can you be a good friend, yet stay on track financially?

First, you can politely decline, especially if it’s a destination wedding that’s clearly beyond your budget. That’s no fun, but you won’t be alone. According to a Bankrate survey, some 21 percent of wedding invitees have sent their regrets because they couldn’t afford to attend.

Most couples plan long engagement; you can use that time wisely to find ways to reduce your costs. If you’ll be traveling for the wedding, set up a flight alert to snag a good airfare deal. Find a friend who’s going and share an Airbnb rental, instead of getting your own hotel room. Plan your regular haircut and manicure appointments to align with the wedding date, so you don’t make special trips.

Consider a DIY gift. The blog Penny Hoarder offers suggestions such as photo collage letters, a relationship map, or a personalized recipe book. Putting in a little imagination and effort will not only save money but ultimately can be more personal and meaningful for the happy couple.