A consular fee of $118 is charged in dollars or rubles (at the consulate's exchange rate) directly at the consular department when submitting documents.
As Travel.ru notes, the fee is non-refundable in case of refusal. Previously, the consular fee was $34.
A tourist visa for up to 90 days can also be obtained upon arrival at the airport by presenting a valid foreign passport, round-trip tickets (physical or printout of electronic) and paying the same fee.
The tourist visa is valid for entry within 90 days from the date of issue. If necessary, the visa can be extended in Madagascar by contacting the local immigration office.