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$.

Let's think step by step and output the final answer within \boxed{}.
user