spoj#CDRSANJ. CODER FIRST PROBLEM

    ID: 21772 远端评测题 1000ms 1536MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>mathsieveprime-numbers-1factorisation

CODER FIRST PROBLEM

 

<strong>CODER SANJAY</strong> is now ready to put up his first problem in his favorrite website <strong>SPOJ</strong>.As it is his first problem,he wanted it to be easy so that most of them could get an <strong>AC</strong>.
The problem statement looks like this:
<p>
<br><strong>F(x)</strong> is a function whose properties are as follows.</br>
<p>1.<strong>F(x)=0</strong> at x=0.</p>
<p>2.<strong>F(x)=1</strong> at x=1.</p>
<p>3.<strong>F(x)=2</strong> at x=2.</p>
<p>4.<strong>F(x)=0</strong> if x is odd prime.</p>
<p>5.<strong>F(ab)=F(a)+F(b)</strong>,where a,b are two positive integers and sum of a and b is minimum.</br>
</p>
<br>Your task is simple.You are to output the value of <strong>F(x)</strong> for the given input integer <strong>x</strong>. </br>
Input
The only line of input contains a single integer <strong>x</strong>. 
Output
Output the value of <strong>F(x)</strong>
Example
Input:
<p>
4
</p>
Output:
<p>
4
</p>
<strong>CODER SANJAY</strong> is now ready to put up his first problem in his favorrite website <strong>SPOJ</strong>.As it is his first problem,he wanted it to be easy so that most of them could get an <strong>AC</strong>.
The problem statement looks like this:
<p>
<br><strong>F(x)</strong> is a function whose properties are as follows.</br>
<p>1.<strong>F(x)=0</strong> at x=0.</p>
<p>2.<strong>F(x)=1</strong> at x=1.</p>
<p>3.<strong>F(x)=2</strong> at x=2.</p>
<p>4.<strong>F(x)=0</strong> if x is odd prime.</p>
<p>5.<strong>F(ab)=F(a)+F(b)</strong>,where a,b are two positive integers and sum of a and b is minimum.</br>
</p>
<br>Your task is simple.You are to output the value of <strong>F(x)</strong> for the given input integer <strong>x</strong>. </br>
Input
The only line of input contains a single integer <strong>x</strong>. 
Output
Output the value of <strong>F(x)</strong>
Example
Input:
<p>
4
</p>
Output:
<p>
4
</p><strong>CODER SANJAY</strong> is now ready to put up his first problem in his favorrite website <strong>SPOJ</strong>.As it is his first problem,he wanted it to be easy so that most of them could get an <strong>AC</strong>.
The problem statement looks like this:
<p>
<br><strong>F(x)</strong> is a function whose properties are as follows.</br>
<p>1.<strong>F(x)=0</strong> at x=0.</p>
<p>2.<strong>F(x)=1</strong> at x=1.</p>
<p>3.<strong>F(x)=2</strong> at x=2.</p>
<p>4.<strong>F(x)=0</strong> if x is odd prime.</p>
<p>5.<strong>F(ab)=F(a)+F(b)</strong>,where a,b are two positive integers and sum of a and b is minimum.</br>
</p>
<br>Your task is simple.You are to output the value of <strong>F(x)</strong> for the given input integer <strong>x</strong>. </br>
Input
The only line of input contains a single integer <strong>x</strong>. 
Output
Output the value of <strong>F(x)</strong>
Example
Input:
<p>
4
</p>
Output:
<p>
4
</p><strong>CODER SANJAY</strong> is now ready to put up his first problem in his favorrite website <strong>SPOJ</strong>.As it is his first problem,he wanted it to be easy so that most of them could get an <strong>AC</strong>.
The problem statement looks like this:
<p>
<br><strong>F(x)</strong> is a function whose properties are as follows.</br>
<p>1.<strong>F(x)=0</strong> at x=0.</p>
<p>2.<strong>F(x)=1</strong> at x=1.</p>
<p>3.<strong>F(x)=2</strong> at x=2.</p>
<p>4.<strong>F(x)=0</strong> if x is odd prime.</p>
<p>5.<strong>F(ab)=F(a)+F(b)</strong>,where a,b are two positive integers and sum of a and b is minimum.</br>
</p>
<br>Your task is simple.You are to output the value of <strong>F(x)</strong> for the given input integer <strong>x</strong>. </br>
Input
The only line of input contains a single integer <strong>x</strong>. 
Output
Output the value of <strong>F(x)</strong>
Example
Input:
<p>
4
</p>
Output:
<p>
4
</p><strong>CODER SANJAY</strong> is now ready to put up his first problem in his favorrite website <strong>SPOJ</strong>.As it is his first problem,he wanted it to be easy so that most of them could get an <strong>AC</strong>.
The problem statement looks like this:
<p>
<br><strong>F(x)</strong> is a function whose properties are as follows.</br>
<p>1.<strong>F(x)=0</strong> at x=0.</p>
<p>2.<strong>F(x)=1</strong> at x=1.</p>
<p>3.<strong>F(x)=2</strong> at x=2.</p>
<p>4.<strong>F(x)=0</strong> if x is odd prime.</p>
<p>5.<strong>F(ab)=F(a)+F(b)</strong>,where a,b are two positive integers and sum of a and b is minimum.</br>
</p>
<br>Your task is simple.You are to output the value of <strong>F(x)</strong> for the given input integer <strong>x</strong>. </br>
Input
The only line of input contains a single integer <strong>x</strong>. 
Output
Output the value of <strong>F(x)</strong>
Example
Input:
<p>
4
</p>
Output:
<p>
4
</p><strong>CODER SANJAY</strong> is now ready to put up his first problem in his favorrite website <strong>SPOJ</strong>.As it is his first problem,he wanted it to be easy so that most of them could get an <strong>AC</strong>.
The problem statement looks like this:
<p>
<br><strong>F(x)</strong> is a function whose properties are as follows.</br>
<p>1.<strong>F(x)=0</strong> at x=0.</p>
<p>2.<strong>F(x)=1</strong> at x=1.</p>
<p>3.<strong>F(x)=2</strong> at x=2.</p>
<p>4.<strong>F(x)=0</strong> if x is odd prime.</p>
<p>5.<strong>F(ab)=F(a)+F(b)</strong>,where a,b are two positive integers and sum of a and b is minimum.</br>
</p>
<br>Your task is simple.You are to output the value of <strong>F(x)</strong> for the given input integer <strong>x</strong>. </br>
Input
The only line of input contains a single integer <strong>x</strong>. 
Output
Output the value of <strong>F(x)</strong>
Example
Input:
<p>
4
</p>
Output:
<p>
4
</p><strong>CODER SANJAY</strong> is now ready to put up his first problem in his favorrite website <strong>SPOJ</strong>.As it is his first problem,he wanted it to be easy so that most of them could get an <strong>AC</strong>.
The problem statement looks like this:
<p>
<br><strong>F(x)</strong> is a function whose properties are as follows.</br>
<p>1.<strong>F(x)=0</strong> at x=0.</p>
<p>2.<strong>F(x)=1</strong> at x=1.</p>
<p>3.<strong>F(x)=2</strong> at x=2.</p>
<p>4.<strong>F(x)=0</strong> if x is odd prime.</p>
<p>5.<strong>F(ab)=F(a)+F(b)</strong>,where a,b are two positive integers and sum of a and b is minimum.</br>
</p>
<br>Your task is simple.You are to output the value of <strong>F(x)</strong> for the given input integer <strong>x</strong>. </br>
Input
The only line of input contains a single integer <strong>x</strong>. 
Output
Output the value of <strong>F(x)</strong>
Example
Input:
<p>
4
</p>
Output:
<p>
4
</p>
The problem statement looks like this:
<p>
<br><strong>F(x)</strong> is a function whose properties are as follows.</br>
<p>1.<strong>F(x)=0</strong> at x=0.</p>
<p>2.<strong>F(x)=1</strong> at x=1.</p>
<p>3.<strong>F(x)=2</strong> at x=2.</p>
<p>4.<strong>F(x)=0</strong> if x is odd prime.</p>
<p>5.<strong>F(ab)=F(a)+F(b)</strong>,where a,b are two positive integers and sum of a and b is minimum.</br>
</p>
<br>Your task is simple.You are to output the value of <strong>F(x)</strong> for the given input integer <strong>x</strong>. </br>
Input
The only line of input contains a single integer <strong>x</strong>. 
Output
Output the value of <strong>F(x)</strong>
Example
Input:
<p>
4
</p>
Output:
<p>
4
</p><strong>CODER SANJAY</strong> is now ready to put up his first problem in his favorrite website <strong>SPOJ</strong>.As it is his first problem,he wanted it to be easy so that most of them could get an <strong>AC</strong>.
The problem statement looks like this:
<p>
<br><strong>F(x)</strong> is a function whose properties are as follows.</br>
<p>1.<strong>F(x)=0</strong> at x=0.</p>
<p>2.<strong>F(x)=1</strong> at x=1.</p>
<p>3.<strong>F(x)=2</strong> at x=2.</p>
<p>4.<strong>F(x)=0</strong> if x is odd prime.</p>
<p>5.<strong>F(ab)=F(a)+F(b)</strong>,where a,b are two positive integers and sum of a and b is minimum.</br>
</p>
<br>Your task is simple.You are to output the value of <strong>F(x)</strong> for the given input integer <strong>x</strong>. </br>
Input
The only line of input contains a single integer <strong>x</strong>. 
Output
Output the value of <strong>F(x)</strong>
Example
Input:
<p>
4
</p>
Output:
<p>
4
</p>

CODER SANJAY is now ready to put up his first problem in his favorite website SPOJ.As it is his first problem,he wanted it to be easy so that most of them could get an AC.

 

The problem statement looks like this:

F(x) is a function whose properties are as follows.

1.F(x)=0 at x=0.

2.F(x)=1 at x=1.

3.F(x)=2 at x=2.

4.F(x)=0 if x is odd prime.

5.F(a*b)=F(a)+F(b),where a,b are two positive integers and sum of a and b is minimum.

Your task is simple.You are to output the value of F(x) for the given input integer x.

 

CONSTRAINSTS:

0 < x < 100001.

Input

The only line of input contains a single integer x

Output

Output the value of F(x).


Example

Input:

4

Output:

4