First things first: Quadruple-check your ticket after Tuesday’s Mega Millions drawing. Then do it again.

Do they match the winning numbers (5-28-62-65-70, with a Mega Ball number of 5)?

No? Skip to here.

Yes? Lock the deadbolt and read on.

Congratulations!

So, you’ve done it. Beaten the odds — one in 302,575,350 — and won the largest Mega Millions jackpot in history. And it’s yours alone, so you’re almost certainly about to enjoy an astronomical spike in wealth.

Now what?

Before you shout from the rooftops or broadcast your excitement on social media, take a deep breath and keep some practical advice in mind.

To sign or not to sign the back of the lottery ticket?

There are plenty of people who will advise you to sign the back of the lottery ticket right away — including lottery officials in South Carolina, where Tuesday’s winning ticket was sold. After all, what would happen if, heaven forbid, you lost the ticket? Or worse yet, if an unscrupulous person in your life took the unsigned ticket and claimed it as his or hers?

Not so fast.

A handful of states allow lottery winners to remain anonymous (including South Carolina), while others require them to be publicly identified — though it’s possible winners in those states could still remain anonymous if they claim the prize through a trust or a limited liability company (more on that later). However, signing the back of the lottery ticket with your real name may bind you to claiming the prize under that name, thus releasing your identity to the public even if that’s not what you want.

Earlier this year, a New Hampshire woman who won a $560 million Powerball jackpot found herself in just such a predicament: She wanted to claim the prize under an anonymous trust but had already signed the back of her ticket with her real name.

A judge eventually ruled she could keep the money and her privacy but, as The Washington Post’s Cleve R. Wootson Jr. reported, she lost about $14,000 in interest every day the case remained unresolved.

What may be more advisable is keeping the ticket in a secure place, such as a safe, while you consult with an attorney.

That way, if you decide to create a trust or an LLC through which to claim your prize, you can sign the back of the ticket with the name of those entities instead.

Speaking of attorneys ...

“The three phone calls I would make: lawyer, accountant, financial adviser,” said Randy Zelin, a New York-based litigation attorney.

A lawyer who specializes in trusts and estate planning would be ideal, but the most important thing to remember is that your privacy is paramount, Zelin said this week.

A few years ago, Zelin cringed as he watched another attorney parade his clients — a Tennessee family that had won a $500 million Powerball jackpot — onto the “Today” show to announce their winnings.

“That goes down in the annals of 'What exactly were you thinking?’” Zelin told CNN at the time.

An attorney can help you navigate what you are obligated to divulge under the terms and conditions of your ticket and your state’s public disclosure laws.

“You want to discuss everything from the vehicle that you’re going to use for the money to go to, how to handle the publicity, understanding what your rights are and your obligations are in terms of making yourself available and the use of your likeness,” Zelin told The Post.

These may seem like unnecessary precautions now, but lottery winners are famously susceptible to becoming targets for everything from extortion to blackmail to even kidnapping.

There will certainly be people who approach you for handouts if your name is public.

“You don’t need every family member you never heard of coming out of the woodwork,” Zelin said. “You want to be as low-key and have this money lawyered and away from prying eyes as you possibly can. Just about the last thing you want to do is be public when you win.”

Find a good accountant and financial adviser, too

Mega Millions allows jackpot winners to claim the grand prize either through a onetime lump-sum cash payment or through annual payments over 30 years. In the case of Tuesday’s big prize, the lump-sum cash option will be $878 million, while the annuity payments would, eventually, amount to $1.537 billion.

A reliable accountant can ensure you understand the tax consequences in your state for both options. The website USAMega.com breaks down what your winnings could look like after taxes for your state.

The benefit of the smaller lump sum, of course, is that you get more money right away. That can also be a drawback for people who are not used to wealth.

“There’s nothing inherently different about lottery winnings than it is about other kinds of wealth that’s created,” said Michael S. Arlein, a trust and estate planning lawyer. “But I think often lottery winners don’t come from money, and so they instantaneously have to deal with money. One day they have none, and the next day they have a huge amount. So I think there’s probably a learning curve that exists for lottery winners that doesn’t exist for people who made their money over a longer period of time.”

After you’ve decided whether you want to take the lump sum, a financial adviser can help ensure it’s managed and invested wisely.

As The Post has reported, there are countless stories of people whose lottery winnings have vanished almost as quickly as they won it.

Other lottery winners have realized that every ticket buyer’s fantasy can quickly morph into a nightmare. There are myriad self-inflicted problems that can befall a person who suddenly comes into great wealth. One bought a water park, for example. Several others have gambled their winnings away, including a two-time lottery winner who ended up living in a trailer.

Billie Bob Harrell Jr., who won $31 million in 1997, told his financial adviser shortly before his suicide that “winning the lottery is the worst thing that ever happened to me.”

“How many stories have we heard?” Zelin said. “You’re now a piñata if you allow yourself to be. You really need to be very smart.”

The number one thing to try to hold onto is patience.

Mega Millions winners have between 180 days to one year from the date of the drawing to claim their prize, depending on the state in which the winning tickets were purchased.

That should allow ample time to hire a lawyer, create a trust if necessary and prepare, prepare, prepare.

“You don’t want to do anything too quickly. You have time,” Zelin said. “There’s no need to make any sudden moves, and you want to be very smart about the way you handle it because things happen at about 400 miles an hour and you want to be prepared for it. There’s no substitute for preparation.”

Read more:

He won Powerball’s $314 million jackpot. It ruined his life.

A hospital worker won the Powerball. Her prize: $758.7 million — and police outside her house.

So many people are buying Mega Millions tickets that number combinations are running out

How Mega Millions changed the odds to create a record-breaking $1.6 billion jackpot

Per capita lottery spending has doubled since 1995