Editor's note: This article was originally published earlier in February but has been updated with additional information about the failed Jeb Bush campaign.

Failure in the Iowa caucuses and New Hampshire and South Carolina primaries have caused a number of candidates to call it quits: Martin O'Malley, Rand Paul, Carly Fiorina and, most recently, Jeb Bush, to name a few. But what happens to all the money they've raised when they end their campaigns?

Several candidates have made major hauls in fundraising for 2016. Hillary Clinton's campaign surpassed the $100 million mark in 2015 and has set out to raise an additional $50 million in the first quarter of 2016 alone. Her opponent, Bernie Sanders, has reportedly picked up $73 million for his White House bid through upwards of two million individual donations. Ted Cruz's camp raised $20 million in the fourth quarter of 2015, bringing his campaign total to $45 million. Bush's campaign brought in $33 million, and his super PAC picked up over $100 million, before he dropped out of the race (perhaps money can't buy elections after all).

"Ideally, in any race, you want to end the race having spent all the money you have...but that's not always an easy calculation," said Candice Nelson, professor of government and academic director of the Campaign Management Institute at American University.

Some political campaigns end with a surplus of funds, while others come to a close owing huge sums of money. And while post-election fundraising isn't often much of a problem for winners, for those in the losers' circle, it can be tough.

Over $300 million has been spent on failed presidential bids so far this election cycle, according to an estimate from Time, and some campaigns have come to an end with their bank accounts still in the red. Wisconsin Governor Scott Walker, whose presidential bid flamed out in September, is still working to pay off the $1 million debt from his campaign. Mike Huckabee, who dropped out after the Iowa caucus, has asked supporters to help footing his campaign's $90,000 in unpaid bills.

To be sure, this isn't something unique to 2016: Hillary Clinton's failed 2008 run for the Democratic presidential nomination left her with millions of dollars in debt that took more than four years to pay off.

"Someone like Scott Walker, the reason that he's out there still trying to raise money to pay his federal campaign debt is because he doesn't really have much of a choice," said Paul S. Ryan, deputy executive director of the Campaign Legal Center, a Washington, D.C.-based nonprofit organization focused on campaign finance laws.

Candidates are prohibited from accepting more than $2,700 from individual donors, and they cannot take funds from corporations at all. The Federal Election Commission considers unpaid debt as a contribution, so when funds are owed to a corporate vendor, it is essentially an illegal, in-kind corporate contribution until it is paid off.

There is no requirement that federal candidates close down their political committees once they've dropped out of a race, and they are free to continue to raise money, which is presumed to be for some federal election in the future. But if a candidate does wish to close up shop, debt makes the task difficult.

"It's really, really tough to raise money as a candidate who has dropped out of a race or has lost a race," said Ryan.

Failed candidates often enlist the help of others to close the funding gap.

Clinton, whose fundraising efforts were hampered when she became secretary of state (as a member of the Obama administration, she was barred from holding fundraising events, Nelson explained), received assistance from her husband and former President Bill Clinton in retiring her debt and from President Barack Obama. Cruz has urged his supporters to donate to Walker, who has also rented out his email list to a number of GOP presidential candidates, including not only Cruz but Marco Rubio, John Kasich and Ben Carson.

It isn't just presidential runs can can incur debt -- Carly Fiorina left thousands of dollars of debt in her 2010 senatorial bid. She raised eyebrows when she reimbursed herself the more than $1 million she lent the campaign before it came to an end instead of paying vendors and staffers.

Although the former HP CEO was criticized for the maneuver, given campaign-financing laws, it may make sense. Due to a 2002 change in election legislation, candidates can spend as much of their own money on campaigns as they want (see Donald Trump), but once the election takes place, there is a limit on how much they can repay themselves, Ryan explained.

It is worth emphasizing that Fiorina's debt is tied to her campaign, it's not personal.

"Candidates are very careful to make sure it's campaign debt and not a personal debt," said Nelson. "Sometimes, the candidate will say, 'I'll take a second mortgage,' but most campaign managers will advise against that."

Of course, many candidates break even in their campaigns -- and some even end up with a surplus.

When federal political candidates still have money in the bank post-election day, they have a number of options for spending. They can give it to another candidate, their political parties or charitable organizations, or they can change committee types to create political action committees or other entities with looser restrictions than candidate committees.

What they cannot do, however, is hold onto it for themselves. "You can't pocket it," said Ryan. He added that the personal use ban sticks with the money, so if funds are donated to a university, for example, the person cannot then be given a job at the institution.

Those who win their elections may be inclined to save their money for use in future contests. In fact, a victory often translates to an increase in donations.

"In some ways, the easiest campaign money to raise is the money that a person that wins an election starts raising right after they win the election and take office," Ryan said. "And that's for the simple fact...that many campaign contributors are really looking to buy access and influence with elected officials."

Leftover funds in the campaigns of members of the House of Representatives and the Senate are presumed to be for their next elections, and once members of Congress are elected, they often nearly immediately start raising money. "You're pretty much raising money perpetually," Ryan said. And winning candidates are much likelier to have money left over than losers, especially in Congressional races that are uncontested.

As Election Day approaches, campaigns work to strive a delicate balance between funds raised and money spent -- especially as it begins to appear they may end up on the losing end of things. "When you see the writing on the wall, you want to try to get as close to debt-free as possible," Nelson said.