In a basket of apples, 18% of them are rotten and 123 are in good condition. Find the total number of apples in the basket.

(1-.18)x = 123

Solve for x.