We use the sum formula for an arithmetic progression where the first term a is 54 and the common difference d is -3. Substituting the sum S = 513 into the formula S = (n/2) * [2a + (n - 1)d] gives 513 = (n/2) * [108 - (n - 1)3]. Multiplying by 2 and rearranging results in the quadratic equation n^2 - 37n + 342 = 0, which factors into (n - 18)(n - 19) = 0. Since all terms are positive only up to n = 18, the valid number of terms is 18.