What do you do when you owe $80 billion?
You borrow more.
And that is what Brazil is doing as it scrambles to pay for oil imports, to meet foreign debt payments, and to keep its burgeoning economy on course.
The first steps in Brazil's economic plan are:
* An International Monetary Fund (IMF) loan of nearly $4 billion to cover balance-of-payments deficits next year.
* A ''bridge'' loan from private foreign banks of $1-to-$2 billion to get Brazil over the servicing hump on that $85 billion foreign debt this year.
International bankers are almost certain to grant Brazil's requests for money. Most regard Brazil as a good investment despite its current cash-flow shortage - the worst in years - which is severely crimping the country's ability pay the $17 billion of foreign debt coming due.
How long the cash flow shortage will continue is anyone's guess. But most financial experts here say Brazil will be able to pay about $9 billion of the $ 17 billion due on principal, interest, and service in 1983. The rest will have to come from rollovers, new loans, and perhaps some refinancing. In the meantime , both the IMF and ''bridge'' loans should get Brazil into the new year.
Beyond the immediate financial crunch, many analysts say Brazil's economic problems will grow even worse. Many say the nation's foreign debt could reach $ 110 billion by 1990. By the year 2000, some think the debt may soar to $200 billion.
But at this moment, Brazilians are worrying about $85 billion. They and their creditors think they can meet payments on that debt with hard work; they do not view it as impossible to meet.
One factor in meeting the debt is stepped-up exports. This giant country already exports a wide array of goods, with emphasis on agricultural products - coffee, cocoa, soybeans, sugar, and citrus. But it also exports cars, trucks, buses, military weaponry, and clothes. Together these products are expected to net Brazil close to $20 billion this year. Imports will total about $18 billion - leaving $2 billion for debt payback.
Next year exports are expected to total $24 billion. And economic planners aim to reduce imports by about $3 billion. This scenario would leave a surplus of about $9 billion.
The projected drop in imports would come from cutting out nonessential consumer goods, reducing oil imports, and paying less for imported goods. Brazil aims to increase exports by boosting sales of armaments by half a billion dollars, orange juice concentrate by a similar amount, other agricultural exports, and clothing (including jeans). Clothing exports are expected to net more than $500 million during 1983.
There are ''ifs'' in the export-import plan. Brazil may not meet its export goals because world demand for some of its products is slackening. But Brazilian and foreign bankers remain fairly optimistic. International bankers are by far less worried about Brazil than, say, about Mexico, whose foreign debt is about the same as Brazil's.
The reason they are less worried about Brazil is that this country has a widely diversified export economy; it is much more flexible when the bottom drops out on one or another export product than is Mexico's economy, which is dominated by oil exports.
Moreover, Brazil's size, its vast reserves of raw materials (except oil), its willingness to find and utilize novel energy sources, and its sense of dynamism give Brazilians and foreigners confidence in Brazil's future.
''Brazil is not like Mexico,'' says a US banker with a big stake here. ''For us, Brazil is a bit like a good business customer who experiences a temporary cash flow shortage. You know he is a good risk, that if you carry him and help him through his current crisis, he'll pay back the debt - and remain a good customer, borrowing more in the future.''
Another US banker says: ''Brazil won't do what the United States did in the last century when it defaulted on railroad bonds from British and German banks. . . . Brazil frankly has more sense of monetary morality and national pride than did our country 100 years ago.''
That pride, however, makes it difficult for Brazil to ask the IMF for help. Brazil has steered clear of that organization since 1958, when the late President Juscelino Kubitschek refused to accept tough conditions attached to IMF financing.
But now Brazil knows it must court the IMF. In a way, Brazil has been preparing for this moment for some time. Economy Minister Antonio Delfim Netto two years ago imposed sharp cuts in government spending, a steep currency devaluation, and a cooling-off of economic expansion. These are the types of conditions the IMF would require.
At the same time, the austerity measures have damaged some sectors of the economy. For example, it is harder for Brazilians to get loans for business expansion. The economic recession here is partly a result of international market forces beyond Brazil's control but also partly a result of national austerity measures.
''The economy has cooled down to the point that our growth has slowed to a standstill,'' says an Economy Ministry spokesman in Brazilia.
''Everything hinges now on an effort to weather another difficult year or so and to use new funding and new loans to begin to get the economy rolling again, '' says an Economy Ministry spokesman.
''We'll do it. But there will be some rough spots ahead.''
Brazilians, of course, wish they did't have to go this route. But they see it as a short-term bailout and they realize that their problems are not as difficult as those of other Latin American nations.
Newspapers take this view and are careful to say that this country's problems are not as bad as Argentina's and Mexico's. They note that Brazil's debt is largely long term. Only about 15 percent is due next year, compared to the nearly 40 percent short-term debt facing Mexico and Argentina.
In addition, Brazil is relatively stable. Its Nov. 15 election, in which opposition politicians did well, particularly in the populous and industrialized southland, are viewed in international banking circles as a strong plus for Brazil.
Former Chase Manhattan Bank President David Rockefeller, who is currently in Brazil, said this week that the elections were ''a happy example'' to the hemisphere.
''No one is rocking the boat,'' says a European banker whose institution has a $2 billion stake here. ''Everyone knows how important stability is to keep Brazil growing.
''And grow it will during the 1980s.''
Actually, some of the European bankers are a bit more cautious about Brazil, but they, too, like US bankers, are generally optimistic.
Another says: ''The difficulty Brazil has is one of disassociating itself in the eyes of the world from Mexico and Argentina. Those two countries are in deep trouble. Brazil's debt is every bit as big as Mexico's. But it not as serious. Yet it scares many people.''
Indeed it does. Many small US banks that are in loan consortiums led by big banks in New York are particularly worried. Mr. Rockefeller acknowleged this problem when he said that the big banks are ''trying to make the small banks . . . undertsnad (the situation) and that they would be better off if they continue to support'' loans to Brazil.
The trouble with that approach is that it is difficult for these small bankers to see a difference between Mexico and Brazil.
Jefferson Almeida da Costa, a Banco do Brasil economist, says this is as big a problem as the debt itself.
''The world finds it hard to see that we are different. We're sounder and the big banks know it and do does the international financial community.
''It may be that our biggest challenge in the next year or so will not be the regearing of our economy, but rather the redoubling of our efforts to show our soundness to the world.''