Dreaming of a savings goal is almost always fun — a sunny vacation, the perfect home, a dazzling holiday gift. But think about how long it can take to get there, and all that fun might fade away.

Even if you’re doing the right things, such as cutting your expenses or taking a part-time job for extra income, it can be discouraging when the finish line is far away. Here’s how to stay motivated until you reach it.

Automate your savings

If you plan to save a little bit each month for the next year or so, you can simplify the process by setting up automatic transfers from your checking account to your savings. You’ll be making deposits without extra effort.

This tactic helped Marissa Ryan, co-founder of a Chicago-based digital marketing agency, when she wanted to save $25,000 for her wedding within 18 months. Using direct deposit, she split her paycheck between two different accounts, one for her wedding fund and the other for daily expenses.

She says automation helped, because there were months she didn’t feel like making the effort. “Setting up automatic deposits took ‘me’ of the equation, so I didn’t have to worry about skipping a month,” Ryan says.

To boost your savings even more with minimal effort, put your money into a high-yield savings account or certificate of deposit, which can earn 20 times more than a traditional savings account.

Celebrate small wins

Say you want to save $5,000, and you’ve set aside $500. That’s a reason to celebrate, says Joseph Polakovic, owner of Castle West Financial LLC, a financial advisory firm in San Diego.

He explains that when you have a large financial goal, it helps to see it as a series of smaller targets that are easier to meet. When you reach these milestones, celebrating them  — with an inexpensive treat, for example — can help you stay motivated.

“You don’t get just one reward at the end. You give yourself several rewards along the way,” he says.

Look at the big picture. Literally.

While you don’t want to be overwhelmed by how far away a goal seems, reminders of the goal itself can be helpful. Once Ryan picked her perfect wedding venue, she downloaded a picture of it and used it as the background image on her phone’s home screen. “It made me feel good just to anticipate the place, and that kept me going,” she says.

Polakovic agrees that this is a good strategy. You could print a photo that represents your goal and place it where you see it every day, such as on the refrigerator or bathroom mirror, he says.

Take setbacks in stride

There will probably be stumbling blocks along the way. For Ryan, it was an unexpected $3,000 car repair bill. She says she used some of her wedding fund to pay it, but was determined to rebuild the balance as quickly as possible.

If you do have a savings shortfall, there are options for getting back on track, including increasing your income. Ryan says she took on extra freelance work in order to replenish her fund.

Be accountable

Find a friend or family member who you can update on your progress. Scott Perry of Raleigh, North Carolina, says he and his wife held each other accountable when they decided to pay off $60,000 in student loans early. They made a plan to live below their means and earn extra income with side hustles. When surprise money came their way, say from a gift or job bonus, they’d use some of it to pay down loan principal, in addition to building up an emergency fund.

“There were times we would have rather gone out to eat on weekends instead of cooking at home to save money,” he says, but together, they resisted these urges. With a little time and patience, Perry says, they were able to cut their loan repayment period nearly in half, writing the last check a little more than five years after they started making payments.

Your savings goal can sometimes seem like a faraway dream. But keep plugging away, and it can eventually become a reality.

The article How to Keep Your Spirits Up in the Long Game of Saving originally appeared on NerdWallet.