5. A pile of identical beads totals 2940. Each time, $x$ beads are taken, and after several times, they are all taken. If $x$ is odd, there are $a$ different ways to take them; if $x$ is a prime number, there are $b$ different ways to take them.
$$
a+b=
$$
. $\qquad$
$16$