Initially, a candle factory produced 5725 candles, but 2594 were defective and had to be discarded. Then, they made an additional batch of 490 candles. How many viable candles were there in total after the second batch was made?