I was exploring some sum when I came across this sum which I have no idea the value, here is the sum

Let $ N $ be an integer with the prime decomposition $ N = p_1^{k_1} p_2^{k_2} ... p_m^{k_m} $.

Let $ a $ be another integer such that $ 0 < a < N $. Consider the sum

\begin{align} \sum_{1 \leq i \leq m} \left \{ \frac{a}{p_i} \right \} - \sum_{1 \leq i < j \leq m} \left \{ \frac{a}{p_i p_j} \right \} + ... + (-1)^m \left \{ \frac{a}{p_1 p_2 ... p_m} \right \} \end{align} where $ \{ x \} = x - \lfloor x \rfloor $ is the factional part function.

I did some numerical calculations and found that the sum is generally small. For some values of $ a $, the sum may get large, but its absolute value seems to be bounded by $ m - 1 $, where $ m $ is the number of distinct prime factors of $ N $ as above.

Any idea how I can evaluate the sum?