Let $A$ be the greatest possible value of a product of positive integers that sums to $2014$.  Compute the sum of all bases and exponents in the prime factorization of $A$.  For example, if $A=7\cdot 11^5$, the answer would be $7+11+5=23$.
1. To maximize the product of positive integers that sum to 2014, we need to consider the properties of numbers. Specifically, the product of numbers is maximized when the numbers are as close to each other as possible. For positive integers, this means using as many 3's as possible, since $3 \times 3 = 9$ is greater than $2 \times 2 \times 2 = 8$ and both sum to 6.

2. We start by expressing 2014 in terms of 3's and 2's. We want to use as many 3's as possible:
   \[
   2014 = 3 \times 670 + 2 \times 2
   \]
   This is because $2014 = 3 \times 670 + 4$ and $4 = 2 \times 2$.

3. Therefore, the product $A$ can be written as:
   \[
   A = 3^{670} \times 2^2
   \]

4. Next, we need to find the sum of all bases and exponents in the prime factorization of $A$. The prime factorization of $A$ is $3^{670} \times 2^2$. The bases are 3 and 2, and the exponents are 670 and 2.

5. Summing these values:
   \[
   3 + 2 + 670 + 2 = 677
   \]

The final answer is $\boxed{677}$.