Amazing Primes

0

0 votes
Easy
Problem

Shashank loves prime numbers. Prime numbers are positive integers that have exactly two distinct positive divisors.

Whenever he gets bored, he takes a number n and represent that number as sum of prime numbers. He want to use minimum number of primes in his representation. The prime numbers used need not to be distinct.

You have to help Shashank by calculating the minimum number of primes required to represent the n as sum of primes.

Input Format

First line contains integer, n

Output Format

Output a single integer, which is answer to the problem

Constraints

  • 3 ≤ n ≤ 109
  • n is odd
Sample Input
9
Sample Output
2
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

9 = 2 + 7
Thus at least 2 primes are required to get the sum 9

Contributers:
Editor Image

?