MONROE, Maine — David Doak’s cow barn is a long way from the halls of the Capitol. But recent decisions — and decisions that loom just months ahead — by Congress could affect Doak’s ability to keep his dairy farm profitable.

Doak’s farm, and the 300 other dairy farms in Maine, have struggled in recent months.

Prices per 100 pounds of milk have been good of late. Doak, who milks 45 cows, most recently was paid $25 per “hundred weight” by Oakhurst, he said Friday.

“The price isn’t the problem right now,” Doak said. “It’s the input,” or cost to produce the milk.

Prices for grain climbed through the fall, the result of a historic drought in the Midwest. Doak buys a grain mix from Cargill, based in Vermont. The cows especially need that feed during winter, but even in summer their grazing is supplemented by the mix.

And high fuel prices through the summer months, when Doak is using his tractor and other equipment the most, also hurt.

“Fuel prices affect just about everything we use,” Doak said, including fertilizers for the corn and hay he grows for his cows, plastics for containers and other equipment, and tires for his tractor. Doak even has to pay the cost of trucking his milk to the plant in Portland, which he estimates at $1 per hundred pounds.

Julie-Marie Bickford, executive director of the Maine Dairy Industry, said that according to a recent report by the University of Maine Cooperative Extension, small farms like Doak’s see an average of $30 in costs to produce 100 pounds of milk.

“Input costs for farmers have been extremely high,” she said.

In view of such unsustainable costs, industry watchers are further unnerved by a shift in philosophy by some in Congress on the idea of agricultural price supports.

A footnote to the “fiscal cliff” debate in the waning hours of last year was a decision on the federal farm bill, a large and diverse spending plan that includes price supports for farmers, including price “floors,” or minimums for milk.

If the farm bill hadn’t been extended, prices would have reverted to a 1949 “parity” structure, through which milk prices are set by the price of cheese and other commodities at the Chicago Mercantile Market. The hundred-weight price might have been at $39 for farmers. That might have meant store prices of $7-$8 per gallon.

Analysis provided by Sen. Susan Collins’ office noted that while farmers would initially be rolling in the dough at nearly $40 per hundred pounds of milk, consumer demand would quickly drop, leaving those farmers without a market.

When the dust settled New Year’s Day, there were no big changes in dairy subsidies. But there was enough at stake to have Maine’s Agriculture Commissioner Walter Whitcomb on the phone with Don Hoenig, the former state veterinarian who now serves on Collins’ staff, to monitor the debate through New Year’s Eve.

The farm bill of 2008-2012, which was renewed, retains price supports for milk, with the floor set at $16.94 per hundred weight. If prices fall below that level, the federal government pays milk producers to bring their revenue to that level through a program known as MILC, or Milk Income Loss Contract. That spending amounted to about $1.1 billion over the five years the program has been in place, according to Collins’ office.

The MILC program was modeled in part on the New England Dairy Compact, created in the early 1990s. The MILC program also includes a feed adjuster that cushions farmers a bit from those high grain costs.

But in the fall, a federal plan was on the table to replace the subsidies with a margin insurance program through which farmers could purchase protection from price drops. The voluntary nature of the program, along with the various levels of protection it offered, may have left many farmers anxious about their choices, essentially betting on their futures.

Collins, who worked to add the provision to the fiscal cliff agreement that extended milk price supports, called the bill that passed a stop-gap measure, but said she was pleased it averted deeper problems for Maine dairy farmers.

The temporary extension expires in September.

In Maine, dairy farmers have their own price support program, funded through a fee on milk sales. Three levels of farms, based on their revenue, determine the price floor, Bickford said. Small farms like Doak’s are in Tier I, she said, and are guaranteed $21 per hundred weight. Larger farms, assumed to have economies of scale, have a price floor of $18.01.

“The MILC program has helped some,” Doak said, “but not as much as the state program.”

Doak, who serves on the board of directors of the Maine Dairy Industry Association, believes the federal price support system is conceptually broken. New England farms face heating costs that farms in Arizona do not.

“The fear is if you lose production in the, state you lose infrastructure,” so that Maine would be importing milk from other states, or even other countries.

Doak said he and his wife Bernys have enjoyed their 30 years of farming, but admitted, shaking his head, that “to try to figure the dairy prices in Maine will just drive you crazy.”