#P3653. Sum of Möbius Function

    ID: 16904 Type: Default 1000ms 256MiB

Sum of Möbius Function

Sum of Möbius Function

We define the Möbius function ( \mu(x) ) as follows: if every prime factor of ( x ) appears exactly once and there are ( p ) such primes, then ( \mu(x)=(-1)^p ); otherwise, if any prime factor appears more than once, ( \mu(x)=0 ). Note that for ( x=1 ), we define ( \mu(1)=1 ) since there are no prime factors.

Your task is to calculate the sum ( \sum_{i=l}^{r} \mu(i) ).

inputFormat

The input consists of two space-separated positive integers ( l ) and ( r ) (with ( 1 \leq l \leq r )).

outputFormat

Output a single integer, which is the value of ( \sum_{i=l}^{r} \mu(i) ).

sample

1 1
1