As any other W140 car, the 1998 S320 is expensive to run and maintain (if you want to keep it top shape).
Although, being a 6 is relatively cheaper to run than the V8s and 1998 and 1999 model years are ALMOST trouble free compared to previous years.
You always have to keep a close watch to the A/C (expensive evaporator problems) and the W140 just love to eat (big and expensive) tires like potato chips.
When buying the car BE SURE everything works properly (all electrical, hydraulic and power feautures). Any repairs on a W140 are not cheap. Better if the tires have more than half of their life on them and the engine compartment is spotless (with no leaks).
If you are extremely concern about maintenance costs, I will advise you to go for an E420/E320. Although, I admit the S class W140 has no competition for size, comfort and luxury.