In a battery of 30 cells connected in series, three cells are connected wrongly with reverse polarity. How many cells in the battery are effective?