Problem: It's tough to be a superhero. And it's twice as tough to resist the supervillain who is cool at math. Suppose that you're an ordinary Batman in an ordinary city of Gotham. Your enemy Joker mined the building of the city administration and you only have several minutes to neutralize the charge. To do that you should enter the cancel code on the bomb control panel.

However, that mad man decided to give you a hint. This morning the mayor found a playing card under his pillow. There was a line written on the card:

<image>

The bomb has a note saying "J(x) = A", where A is some positive integer. You suspect that the cancel code is some integer x that meets the equation J(x) = A. Now in order to decide whether you should neutralize the bomb or run for your life, you've got to count how many distinct positive integers x meet this equation.

Input

The single line of the input contains a single integer A (1 ≤ A ≤ 1012).

Output

Print the number of solutions of the equation J(x) = A.

Examples

Input

3


Output

1


Input

24


Output

3

Note

Record x|n means that number n divides number x.

<image> is defined as the largest positive integer that divides both a and b.

In the first sample test the only suitable value of x is 2. Then J(2) = 1 + 2.

In the second sample test the following values of x match:

  * x = 14, J(14) = 1 + 2 + 7 + 14 = 24
  * x = 15, J(15) = 1 + 3 + 5 + 15 = 24
  * x = 23, J(23) = 1 + 23 = 24

Solution (in JAVA):

Solution:
import java.io.*;
import java.lang.Math;
import java.util.*;

public class Main
{	
	public BufferedReader in;
	public PrintStream out;
	
	public boolean log_enabled = false;
	
	static long[] primes;
	static int p_count;
	
	public static void get_primes(int n)
	{
		primes = new long[80000];
		
		boolean[] v = new boolean[n+1];
		int i,j;
		for (i=2; i<=n;i++)
		{
			v[i] = true;
		}
		
		for (i=2; i*i<=n;i++)
		{
			if (v[i])
			{
				for (j=i; i*j<=n; j++)
				{
					v[i*j]=false;
				}
			}
		}
		
		p_count = 0;
		for (i=2; i<=n; i++)
		{
			if (v[i])
			{	
				primes[p_count++] = i;
			}
		}
	}

	int d_count;
	int[] d_index;
	long A;
	
	public int d_index(long x)
	{
		if ( (x<1000000) && (x*x<=A))
		{
			return d_index[(int)x];
		}
		else
		{
			return d_count - d_index[(int)(A/x)] - 1;
		}
	}

	public void test()
	{
		A = readLong();
		
		if (A==1)
		{
			out.println(1);
			return;
		}
		
		get_primes(1000000);
		
		
		long[] dividers = new long[10000];
		d_count = 0;
		
		d_index = new int[1000001];
		
		long[] use_primes = new long[10000];
		int use_p_count = 0;
		
		boolean[] p_used = new boolean[1000000];
		Arrays.fill(p_used, false);
		
		int i;
		long I;
		for (I=1; I*I<=A; I++)
		{
			if (A % I == 0)
			{
				d_index[(int)I] = d_count;
				dividers[d_count++] = I;
			}
		}
		
		for (i=0; i<d_count; i++)
		{
			dividers[2*d_count-i-1] = A / dividers[i];
		}
		
		d_count *= 2;
		
		long d;
		int p;
		boolean is_prime;
		
		for (i=1; i<d_count; i++)
		{
			is_prime = true;
			d = dividers[i]-1;
			
			if (d==1) continue;
			
			for ( p=0; p<p_count; p++)
			{
				if (primes[p]*primes[p] > d)
				{
					break;
				}
				
				if (d % primes[p] == 0)
				{
					is_prime = false;
					while (d % primes[p] == 0)
					{ 
						d /= primes[p];
					}
					if (d==1)
					{
						if (!p_used[(int)primes[p]])
						{
							p_used[(int)primes[p]] = true;
							use_primes[use_p_count++] = primes[p];
						}
					}
				}
			}
			
			if (is_prime)
			{
				if ((d > 1000000) || !p_used[(int)d])
				{
					if (d<1000000)
					{
						p_used[(int)d] = true;
					}
					use_primes[use_p_count++] = d;
				}
			}
		}
		
		logWrite("use_p_count = %d\n", use_p_count);
		
		long[] D = new long[d_count];
		long[] D1 = new long[d_count];
		
		Arrays.fill(D, 0);
		D[0] = 1;
		
		for (p=0; p<use_p_count; p++)
		{
			logWrite("P = %d\n", use_primes[p]);
			for (i=1; i<d_count; i++)
			{
				D1[i] = D[i];
				d = use_primes[p];
				while (d<dividers[i])
				{
					if (dividers[i] % (d+1) == 0)
					{
					
						//logWrite("D1[%d] += D[%d] = %d + %d  \n", i,  d_index(dividers[i] / (d+1)), D1[i], D[d_index(dividers[i] / (d+1))]);
					
						D1[i] += D[d_index(dividers[i] / (d+1))];
					}
					
					d *= use_primes[p];
				}
			}
			
			for (i=1; i<d_count; i++) D[i] = D1[i];
		}
		
		
		out.println(D[d_count-1]);
	}
    
	public void run()
	{
		try
		{
			in = new BufferedReader(new InputStreamReader(System.in));
			out = System.out;
			
			//in = new BufferedReader(new FileReader("in.txt"));
			//out = new PrintStream(new File("out.txt"));
			
			
		}
		catch (Exception e)
		{
			return;
		}
		
		//while (true)
		{
			//int t = readInt(); for (int i=0; i<t; i++)					
			{
				test();
			}
		}
	}
	
	public static void main(String args[])
	{
		new Main().run();
	}
	
	private StringTokenizer tokenizer = null;
	
	public int readInt() 
	{
        return Integer.parseInt(readToken());
    }
   
    public long readLong() 
	{
        return Long.parseLong(readToken());
    }
   
    public double readDouble() 
	{
        return Double.parseDouble(readToken());
    }
   
	public String readLn()
	{	
		try
		{
			String s;
			while ((s = in.readLine()).length()==0);
			return s;
		}
		catch (Exception e)
		{
			return "";
		}
	}
	
    public String readToken() 
	{
		try
		{
			while (tokenizer == null || !tokenizer.hasMoreTokens()) 
			{
				tokenizer = new StringTokenizer(in.readLine());
			}
			return tokenizer.nextToken();
		}
		catch (Exception e)
		{
			return "";
		}
    }
	
	public int[] readIntArray(int n)
	{
		int[] x = new int[n];
		readIntArray(x, n);
		return x;
	}
	
	public void readIntArray(int[] x, int n)
	{
		for (int i=0; i<n; i++)
		{
			x[i] = readInt();
		}
	}
	
	public void logWrite(String format, Object... args)
	{
		if (!log_enabled)
		{
			return;
		}
		
		out.printf(format, args);
	}
}