Here’s the secret to becoming a millionaire: Stop looking for the secret.

You’re probably not going to win the lottery. Most people leave Las Vegas poorer than when they arrived. And despite what your old high-school-friend-turned-Facebook-skin-care-sales-rep says, 99% of multilevel marketing recruits actually lose money.

In fact, the real secret about becoming a millionaire is that this elusive wealth benchmark isn’t actually all that elusive: You can build $1 million or more by making a series of financially smart decisions. Here are three.

1. Start saving when you’re young

According to a recent survey from TD Ameritrade, 53% of millennials expect to become millionaires at some point. The finding was likely intended to surprise — to trigger rolled eyes at the entitlement, or sighs at the naiveté.

But it shouldn’t: To take a page from the skin-care rep handbook, all it takes to become a millionaire is 42 easy payments of $5,500.

OK, they’re not easy payments — there’s nothing easy about saving (unless, perhaps, you’re already a millionaire). And doing so on a consistent basis over 42 long years requires hard work and an iron will.

Nonetheless, if you put $5,500 — the current maximum annual contribution — into an individual retirement account, or IRA, every year starting at age 25 and choose investments that generate an average annual return of 6%, you should end up with just over $1 million at age 67. If that money is invested in a Roth IRA, you’ll pull it out in retirement tax-free.

» Unfamiliar with these accounts? Read our guide to Roth IRAs

The key, obviously, is having that kind of time in front of you. Start at age 35 instead and you’ll end up with half that — or you’ll need to save nearly twice as much to hit the $1 million goal.

2. Earn your 401(k) match

The IRA is a great retirement savings vehicle, but if you are offered a 401(k) at work, you should typically take advantage of that first. Why? Because in most cases, when a company offers a 401(k) plan, it also offers matching dollars. That means your contributions to the 401(k) will be matched by contributions from your employer, at least up to a limit.

That extra help could easily tip the millionaire scale in your favor: Let’s say you’re 25 and earn $45,000 a year. If your employer matches half of your contributions, up to 6% of your salary — which is a common arrangement — you’ll hit $1 million at age 67 by contributing 6% to the 401(k) per year, or just enough to get that match. Without the match, you’d have to contribute 9%.

A match is powerful enough to help late savers catch up: Under the same matching arrangement, someone who is 35, earns $45,000 per year and hasn’t saved anything could still hit $1 million at age 67 by contributing just over 12% of salary to a 401(k).

3. Invest for the long-term

I hear you questioning the 6% return in the scenarios above. But it’s entirely reasonable — some might even say fairly conservative — for a long-term investment: Historically, the U.S. stock market has posted an average annual return of 10%.

Of course, to get returns like that, you have to actually be invested in the stock market. If you’re keeping your cash on the sidelines, you’re going to earn significantly less: A 2017 NerdWallet analysis found that avoiding the stock market and favoring cash instead could actually cost millennials $3.3 million over time.

If you save $5,500 every year for 42 years but only earn a 1% return — as you might in a typical savings account — you’ll end up with less than $300,000 — far short of that million-dollar goal. In fact, to hit $1 million at that kind of low return, you’d have to save nearly $20,000 a year for 42 years.

Bottom line: It’s absolutely crucial to invest in the stock market if you want to build wealth. If you’re unnerved by investing, that’s OK — but understand that the more conservative your investment strategy, the more money you’ll have to save to hit your goal. You won’t have market returns compounding in the background to pick up your slack.

The good news is that stock investing doesn’t require you to be an expert or religiously watch financial news on CNBC. There are some relatively simple and low-maintenance ways to get exposure to stock market returns. See this guide on how to invest in stocks for more detail.

Finally, one important note: Becoming a millionaire is a nice goal, but it’s also a relatively meaningless one. Whether $1 million is enough to retire depends on whether you expect to spend that retirement in an RV or a luxury beachfront condo. Find out how much you actually need to float your retirement dreams by running your numbers through NerdWallet’s retirement calculator.

More from NerdWallet

Arielle O'Shea is a writer at NerdWallet. Email: aoshea@nerdwallet.com. Twitter: @arioshea.

The article You Wanna Be a Millionaire? These Choices Can Get You There originally appeared on NerdWallet.